Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9019433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:46:34+00:00 2026-06-16T04:46:34+00:00

I did bind the circle with marker to make view like: But when I

  • 0

I did bind the circle with marker to make view like:

enter image description here

But when I try to remove marker from the map, the circle still exists. Hmm,

How can I remove marker with circle?

Relevant code:

 function removeMarker(){
    if(selectedMarker)
       selectedMarker.setMap(null);      
}

....

function createCircle()
{
                var circle = {
                strokeColor: "#006DFC",
                strokeOpacity: 0.4,
                strokeWeight: 2,
                fillColor: "#006DFC",
                fillOpacity: 0.15,
                map: mapA,
                center: selectedMarker.getPosition(),
                radius: 50 // in meters
            };
            var cityCircle = new google.maps.Circle(circle);    


            cityCircle.bindTo('center', selectedMarker, 'position');
}

Any suggestions would be appreciated.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:46:36+00:00Added an answer on June 16, 2026 at 4:46 am

    If you want to remove the Circle when you remove the marker, you need to remove it also.

     cityCircle.setMap(null);
    

    You will need to keep a reference to the circle to do that (not tested):

    function removeMarker(){
      if(selectedMarker)
        selectedMarker.setMap(null); 
        selectedMarker._mycityCircle.unbindAll();
        selectedMarker._mycityCircle.setMap(null);  
    }
    
    ....
    
    function createCircle()
    {
      var circle = {
        strokeColor: "#006DFC",
        strokeOpacity: 0.4,
        strokeWeight: 2,
        fillColor: "#006DFC",
        fillOpacity: 0.15,
        map: mapA,
        center: selectedMarker.getPosition(),
        radius: 50 // in meters
      };
    
      cityCircle.bindTo('center', selectedMarker, 'position');
      selectedMarker._mycityCircle = cityCircle;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I did everything I could to make it happen, but without success. The problem
I did make a post previously but was not able to properly explain my
i did this: this.combobox.ItemsSource = Common.Component.ModuleManager.Instance.Modules; to bind the combobox to a collection, which
Did you ever have the following situation: you need to store information, but a
Did about 30 minutes worth of searching, found lots of relevant info, but none
Did not have luck with these examples: Javascript File remove Javascript FSO DeleteFile Method
Did actually someone make already a tutorial that shows how to customize an UITableView?
I had grid view which bind sql data source and added field to update
I'm attempting to bind some repositories to child controller, but I keep on getting
I'm trying to bind the selected value from the date picker to an asp

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.