Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

Thanks,

I am using version 3 of the google maps api.

share|improve this question

1 Answer 1

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

 
discard

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.