Jump to content


Photo

Google Maps - Remove Previous Circle

maps

  • Please log in to reply
1 reply to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 346 posts
  • LocationMelbourne Australia

Posted 25 January 2018 - 09:08 PM

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 '+
                       '    } '+
                       '  ); '+
 
                       '} '
 
                      );
 

  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4969 posts

Posted 26 January 2018 - 05:28 AM

Hi,

 

It seems a similar question:

http://forums.unigui...ge-2#entry36860

 

Best regards,


  • 0





Also tagged with one or more of these keywords: maps

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users