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?

  • By disable, do you mean it shouldn't be available as a base layer?
    – R.K.
    Feb 12, 2012 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, 2012 at 8:13
  • 2
    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, 2012 at 8:23
  • Yes, it make sense, but are there any ways for disable background downloading?
    – drnextgis
    Feb 12, 2012 at 8:30

1 Answer 1


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.

  • 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, 2012 at 2:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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