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

Sorry for cross posting I've asked this question in OL mailing list, but not get response yet. It is very important for me to resolve this issue. I've made a little example that reflect my problem. It's not clear for me why GM layer loads tiles even if this layer is disabled (it can be observed against firebug in Firefox) and how I can to prevent this?

share|improve this question
By disable, do you mean it shouldn't be available as a base layer? – R.K. Feb 12 '12 at 8:07
Of course it should be available as a base layer, but I expect tiles start to load when I turn on this layer as base layer, but now GM tiles loads when another (OSM in this example) layer is set as base layer. – drnextgis Feb 12 '12 at 8:13
It loads in the background you mean? I think OpenLayers does that so that it'd be ready should you choose it as the base layer. Otherwise it'd be slow or at least there would be a lag as the tiles are being downloaded. – R.K. Feb 12 '12 at 8:23
Yes, it make sense, but are there any ways for disable background downloading? – drnextgis Feb 12 '12 at 8:30

OL only load tiles if the layer is "active".

I tested your sample in Chrome and works fine. Once the initial view is fully loaded if I move around only OSM tiles are loaded and when change to GM then the GM are loaded.

What it is true is at the beginning the GM tiles are also loaded. It can be due because you add first the GM layer to the map instead OSM. If you do so then GM is selected as base layer until you manually select OSM as base layer and meanwhile the GM tile can be loaded.

share|improve this answer
As I found out described problem is GM api problem, not OpenLayers. I've told with one of the OpenLayers developer and one of the proposed solutions was to add GM layer by window.setTimeout(). This solution prevents background tiles loading, but not resolves problem at all. If change browser window size - GM tiles starts to load again. I temporarily solved the problem by using v2 GM api. – drnextgis Feb 13 '12 at 2:15
Great, thanks to share !!! – EricSonaron Feb 13 '12 at 19:39

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.