Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Having asked for a google.maps.KmlLayer, and whilst waiting for it to load, is it possible to cancel the request?

Calling layer.setMap(null); seems to causes an error if the layer is not yet visible.

I would like to be able to cancel the request for the layer, then ask for a different layer.


I am using version 3 of the google maps api.

share|improve this question
up vote 1 down vote accepted

Unfortunately no, it is not possible, at least via the API. Because it is all asynchronous, once the request is made there is no control over the request/response until the response (the KmlLayer) comes back.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.