tags:

views:

5

answers:

0

I'm trying to restrict the user to a certain subset of zoom levels (i.e. 8-10 for instance), but there does not appear to be any setMaxZoomLevel/setMinZoomLevel on the MapWidget class itself. Digging further I see theres an addMapZoomEndHandler event which is great for knowing about a zoom after the fact, but no corresponding addMapZoomStartHandler.

The MapEvent class seems to have both a MapEvent.ZOOMCHANGED and MapEvent.ZOOMEND - I take it the ZOOMCHANGED must be between the mouse scroll event and actually rendering the map after ZOOMEND.

I'm not seeing anything obvious where I can use that event nor a general hook I can extend the MapWidget with.

So my question is: "How do I restrict the zoom levels within a min/max zoom range?"