spatialillusions / milgraphics Goto Github PK
View Code? Open in Web Editor NEWMilitary Tactical Graphics
License: MIT License
Military Tactical Graphics
License: MIT License
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?
[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...๐
As an experiment I have created two new javascript files to create both Weapon/Sensor Range Fan Circular and Weapon/Sensor Range Fan Sector with an appropriate weapon symbol at the anchor point.
Here are the results of my experiment:
Circular:
Sector:
I am totally new to Github, so please advise as to how I can propose adding the new files and the files that I have modified to expose the new functionality?
This is the first thing that will be implemented. It will take GeoJSON as input and return GeoJSON to the main class, sort of something like that.
As an experiment I'm working on a simple Leaflet layer for milgraphics. One of the things I want to render is the anchor points that define the geometry of the graphics. Here's an example:
Unfortunately, the original anchor points are not available in the GraphicsLayer
object because they are overwritten by the converted geometry:(https://github.com/spatialillusions/milgraphics/blob/master/src/graphicslayer.js#L8)
feature.graphic = new ms.Graphic(feature);
feature.geometry = feature.graphic.geometry;
Maybe you could keep the original anchor points in feature.geometry
and instead use feature.graphic.geometry
in asOpenLayers
and asCesium
? Another option is to create a copy of the anchor points and store them as an attribute on the feature object. An advantage of the current approach is that it is simple to render the converted graphic in an arbitrary GeoJson render.
2525C
TACGRP.C2GM.SPL.LNE.AMB,
TACGRP.TSK.NEUT,
TACGRP.TSK.OCC,
TACGRP.C2GM.DEF.PNT.OBSPST.CBTPST,
TACGRP.FSUPP.PNT.TGT.PTGT,
TACGRP.FSUPP.PNT.C2PNT.FSS,
TACGRP.FSUPP.PNT.C2PNT.*
TACGRP.MOBSU.OBST.MNE.* (all mines)
TACGRP.TSK.* (All tasks)
This will return a feature collection with styles for Open Layers.
Because it was an easy way to get access to some sample data I made a parser for SitaWare SLF files. Can't read all location types yet, but working on it and it works for all points, lines, and polygons. (And some mulitpoint symbols.)
Geometry converters should return not just the converted geometry, but an object containing information about where labels should be placed on the geometry. It should support multiple labels.
This will add output as a entity collection with styles for Cesium.
For test and display it would be nice to have an optional output that outputs a canvas image of the rendered geometry, this would make the rendering documents much nicer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.