0

I made a script to create dynamic polygons, but to update its value will need to remove it to create another polygon.

The problem is that I'm not finding the solution to remove it. Anyone know how to do?

Thank you!

edited: I am using javascript..

1 Answers1

0

You can update the MapLayer count with your dynamic pin updater, something like this that i have successfully tried

private void mapPinUpdater(List<String> lat, List<String> log, Boolean is_from_stored_location) {
        int count_ofLayer = mapWithMyLocation.Layers.Count;
        if (!is_from_stored_location && count_ofLayer >= 1)
        mapWithMyLocation.Layers.RemoveAt(mapWithMyLocation.Layers.Count - 1);
        MapLayer MyLayer = new MapLayer();

this would remove the previous layer and update the latest layer with your new pins.

Dexto
  • 1,151
  • 9
  • 18
  • Thanks for responding Deepesh .. I'm sorry I forgot to say that I'm doing in javascript. You know that language? –  Dec 30 '13 at 12:20