I've had a search on here to see if this has come up but I've not found anything, sorry if this is a duplicate.

I'm trying to use the Google Maps layers with an OpenLayers site, but not for all zoom levels. What I want to do is use the NASA global mosaic from my own map server (which works) but once I'm zoomed in far enough, switch to Google for lower level imagery from them. So far I've set Google as a base layer and used my own tiles as an overlay, but doing this means a request to google for all the zoom levels that are covered by my tiles. It seems wasteful to get tile data from google which will never be visible to the user.

What I want to do is limit the available zoom levels for the Google Layer to those zoom levels that are not covered by NASA, while not restricting the zoom levels available to the map as a whole.

My best guess was to create a dummy base layer covering the correct resolutions and zoom levels, and set a restricted set of Google as an overlay, but this is proving very difficult.

Any pointers would be much appreciated.


Your Answer

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

Browse other questions tagged or ask your own question.