Giter Site home page Giter Site logo

milgraphics's People

Contributors

kjellmf avatar spatialillusions avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

milgraphics's Issues

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]
Arrow
circle

[Reality]
image

[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...๐Ÿ˜’

Add Weapon/Sensor Range Fan

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:
image

Sector:
image
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?

Add input format GeoJSON

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.

Keep original TacticalJSON anchor points

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:
image

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.

Featured Tactical Graphics List

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)

Add input format SLF

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.)

Make geometry converters return label points

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.

Add simple canvas output

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.