Closed mubinakhan closed 7 years ago
In WW the feature with invalid number of coordinates render on the map with no shapes. No shapes means nothing to see on the map. I added a condition in WW to skip calling the renderer worker for invalid mil std features. The API tester is not rejecting or validating the mil std features that are sent to the engines. In contrast, the cesium engine completely rejects and nothing is render on the map. The correct behavior would be for the core to validate and reject invalid features and to notify the API tester or any client that sent the request. By rejecting, the engines never get invalid requests. The second option is to reject at the engine level like Cesium currently does. Need to discuss with the team.
Decided to add a validation in the API. The API MilStdSymbol class now checks for invalid coordinates. It checks for min and max number of coordinates for a specific symbol code and standard. If invalid, the API will fill out the missing coordinates , or remove any coordinates beyond the max allowed.
Found a hardcoded symbol standard = 0 in the emp3-api class that was generating a single point feature for the multi point KILL BOX BLUE IRREGULAR.
Test case:
Use the dev branch.
-Go to WW map. -Add a quick overlay -Go to general/ Create a mil-stand symbol/add name /add geo-id /add any two positions Coordinates(45,52) -select tactical graphics/tasks/Block Test -create Symbol add to overlay. -Map shows symbol plotted to map successfully and added to overlay
Reintegrate
Merged into the dev branch. Closing this issue
-Go to WW map. -Add a quick overlay -Go to general/ Create a mil-stand symbol/add name /add geo-id /add any two positions Coordinates(45,52) -select tactical graphics/tasks/Block Test -create Symbol add to overlay. -Map shows symbol plotted to map successfully and added to overlay -This should fail when plotting .