Skip to content
This repository was archived by the owner on Feb 24, 2023. It is now read-only.
This repository was archived by the owner on Feb 24, 2023. It is now read-only.

Keep original TacticalJSON anchor points #10

@kjellmf

Description

@kjellmf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions