milgraphics
milgraphics copied to clipboard
draw tactical symbol example
hello, @spatialillusions and @kjellmf
I have a question. I'm using a normal 2D canvas(no 3D map, no cesium, no openLayers) So I used the svg type. However, some returned images were marked with a 'question mark' as shown below. The function I used seems to be 'multipoint' returns a 'question mark'. In short, can you tell me the function that I can draw for 'multipoint'? Or is there an example?
[The result I wanted]
[Reality]

[My Render Code]
let myTactical= ['GFT*I-----****X','GFT*N-----****X','GFT*D-----****X','G*T*F-----****X','G*T*AS----****X','G*T*E-----****X','G*T*O-----****X','G*T*Q-----****X', 'G*T*S-----****X','G*G*OAF---****X','G*T*B-----****X','G*T*H-----****X','G*T*Y-----****X','G*T*C-----****X','G*T*X-----****X','G*T*J-----****X','G*T*UC----****X'];
--> (each symbolElement)
let renderedContent = new ms.Symbol(myTactical[symbolElement], { size: size, uniqueDesignation: element, additionalInformation: element, infoFields: "textInfo" }).asSVG();
ctx.beginPath();
ctx.drawImage(myTactical[symbolElement], x1, y1, x2 - x1, y2 - y1);
ctx.stroke();
Thank you...😒
Hi,
Milgraphics had as a goal to support all tactical graphics, but never got there for different reasons. That you get a question mark indicates that the symbol you try to draw isn’t supported.
Regards Måns
On 5 Jul 2022, at 08:23, NoviceInWeb @.***> wrote:
hello, @spatialillusions and @kjellmf
I have a question. I'm using a regular 2D canvas, not a 3D map. So I used the svg type. However, some returned images were marked with a 'question mark' as shown below. The function I used seems to be 'multipoint' returns a 'question mark'. In short, can you tell me the function that I can draw for 'multipoint'? Or is there an example?
[The result I wanted]
[Actual results]
[My Render Code]
let myTactical= ['GFT*I-----***X','GFTN-----***X','GFTD-----**X','GTF-----**X','GTAS----**X','GTE-----**X','GTO-----**X','GTQ-----**X', 'GTS-----**X','GGOAF---**X','GTB-----**X','GTH-----**X','GTY-----**X','GTC-----**X','GTX-----**X','GTJ-----**X','GTUC----****X'];
--> (each symbolElement)
let renderedContent = new ms.Symbol(myTactical[symbolElement], { size: size, uniqueDesignation: element, additionalInformation: element, infoFields: "textInfo" }).asSVG();
ctx.beginPath(); ctx.drawImage(myTactical[symbolElement], x1, y1, x2 - x1, y2 - y1); ctx.stroke(); Thank you...😒
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.
@spatialillusions thank you!