missioncommand / emp3-web

Extensible Map Platform (EMP) web development kit
Other
19 stars 9 forks source link

MapService setVisible() and remove() do not work. #347

Closed georgegtx closed 7 years ago

georgegtx commented 7 years ago

These methods check for a property "id" instead of "geoId" and fail stating: "This layer does not have an ID. Has it been added to the map yet?".

setVisible will also fail after some lines when trying to set "this.properties.visible" because "this.properties" is undefined.

And again after some lines when constructing the command to send to the MessageHander it uses "emp3.api.channels.showFeature" and "emp3.api.channels.hideFeature" and "emp3.api.chanels.unplotFeature" instead of "emp3.api.enums.channel.showFeature" and "emp3.api.enums.channel.hideFeature" and "emp3.api.enums.channel.unplotFeature".

alberto-acevedo commented 7 years ago

George -Your fix will be part of emp3-web version 2.10.0 that is going soon.

There is another way to remove the service by using the emp3.api.Map.removeMapService(args); This is the way the API tester is using.

Thank you for submitting the fixes.