missioncommand / mil-sym-js

(RETIRED) MIL-STD-2525 symbol rendering JavaScript library for modern web applications
Apache License 2.0
76 stars 25 forks source link

World Extent returns bad multipoint results #16

Open kennywk opened 7 years ago

kennywk commented 7 years ago

Could be an oversight or something but it seems that multiple multipoint graphics will not render, or renders with null coordinate elements when the bbox is equal to the world extent.

This can be reproduced within the multipointtester sample by uncommenting the world extent bbox. This also seems to be the same across "library variations" and is visible in both kml and geojson.

michael-spinelli commented 7 years ago

I'm assuming this is when calling RenderSymbol().
On a 3D globe you can't actually see -90, -180 to 90, 180 all at once. In this situation try passing null/empty string for the bbox OR follow the approach used by EMP for Cesium where that go from the center of the visible map area and extrapolate a bounding box: https://github.com/missioncommand/emp3-web/blob/master/src/mapengine/cesium/js/lib/cesium/EmpCesium.js#L10009

kennywk commented 7 years ago

Actually, it was 2D via open layers. I have since worked around it by specifying the exact bounds versus the world extent. I guess i was thinking that given control points and a world extent, a default rendering would be created based on the bounds of the graphic and not necessarily scaled to world coordinates.

kennywk commented 7 years ago

BTW i have created a openlayers "rendering/drawing" extension that covers most if not all of the EMP graphic types. The graphics implemented are:

Arc, Arrow, Box/Rectangle Corridor Circle Ellipse Point Line Polygon Sector Symbol - Single/Multi/Custom Text

I am also looking into implementing the CMAPI for eventing.... either way i could contribute that to the EMP project if your interested.

K - USAREUR

michael-spinelli commented 7 years ago

I'm interested but we're tied up with other priorities at the moment. I may revisit this with you in October.