Jump to content

Google Maps - Remove Previous Circle


andyhill

Recommended Posts

I place multiple circles over a course of time on a Google Map (using various events).

 

Within a new event, how can I remove the LAST circle drawn and at the same time preserve all of the other circles ?

 

Any help would be appreciated - thanks.

 

      // Draw Circle
      UniSession.AddJS('var gm = googleMap; '+
                       'if (typeof gm == "object") '+
                       '{ '+
 
                       '  var myLatLng = {lat: '+LatStr+', lng: '+LngStr+'}; '+
 
                       '  var circle = new google.maps.Circle '+
                       '  ( '+
                       '    { '+
                       '      strokeColor: ''#0000FF'', '+
                       '      strokeOpacity: 0.8, '+
                       '      strokeWeight: 2, '+
                       '      fillColor: ''#FF0000'', '+
                       '      fillOpacity: 1.00, '+
                       '      map: gm, '+
                       '      center: myLatLng, '+
                       '      radius: 10 '+
                       '    } '+
                       '  ); '+
 
                       '} '
 
                      );
 
Link to comment
Share on other sites

×
×
  • Create New...