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

I have a map which overlays Open Street Map data on imagery for Pennsylvania. As a baselayer to the roads (and eventually other layers) I have two baselayers - Blue Marble NG and USGS EROS 1ft imagery. I would like to be able to combine these two layers into a single base map object that switches automatically as the user zooms in since it makes no sense to view the 1ft imagery for the whole state or the Blue Marble imagery when you are zoomed in.

Ideally I'd like to do this on the client side as I'm pulling the imagery from two different sites.

share|improve this question

2 Answers 2

up vote 17 down vote accepted
  1. Add 2 base layers to the map
  2. Subscribe to the map's zoomend event
  3. Check the zoom level and just switch the base map for your user

Here's a sample page with an event handler for zoomend -

share|improve this answer
That works really well - <>; – iant Sep 20 '10 at 21:03
@iant, Any chance I could get you to paste a snippet of you code? I'm trying to make this happen, and it's just buggy. Thanks! – user13065 Nov 23 '12 at 21:48

Another way... using opacity control

Try this example

a combo of USGS_EDC_Elev_NED_3 (Shaded Relief) and Topo Maps with opacity control

Works quite well.

share|improve this answer
Not quiet the effect I was trying for but a nice example. – iant Sep 20 '10 at 20:00

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.