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

  • SEARCH
  • Home
  • 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 8394049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:57:50+00:00 2026-06-09T19:57:50+00:00

I have a reset button that I want to reset the map (including removing

  • 0

I have a reset button that I want to reset the map (including removing overlays) when clicked.

I’ve been reading around and apparently the way you remove KML overlays is by;

  1. Declaring your kml variable as a global variable

    var ctaLayer = new google.maps.KmlLayer(null);

  2. These are the lines that cause the kml file to overlay on google maps

   var ctaLayer = new google.maps.KmlLayer(kmlFile);
   ctaLayer.setMap(map);
  1. And then call setMap(null) to remove the overlay.

    ctaLayer.setMap(null);

However, this does not seem to be working. I don’t get any errors so I’m guessing I’m missing something? I’d appreciate any advice on getting this to work.

  • 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-09T19:57:51+00:00Added an answer on June 9, 2026 at 7:57 pm

    Remove the var from in front of the second var ctaLayer (the one that makes it local to the function).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a counter in my app that has a reset button, but instead
I have a clear button that I want to tie into some php coding.
Please how can i make the submit button and reset button have a different
I have code that looks like the following: //unrelated code snipped resolver.reset(new tcp::resolver(iosvc)); tcp::resolver::query
I have a form that I want to be used to add entries. Once
I have an app that runs for a while, but needs to be reset
I have 2 ArrayLists that I want to display at alternate times. I have
I have a number of input button elements throughout my site that perform Ajax
I'm trying to setup a button on a map that allows a user to
I'm writing a java applet with a reset button so that users can restart

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.