As far as I found, there are 5 ways to zoom a map: 1. by double clicking map, which is governed through setDoubleClickMode().
http://code.google.com/intl/pl/apis/maps/documentation/flash/reference.html#Map.setDoubleClickMode The default value is 2, e.g. http://code.google.com/intl/pl/apis/maps/documentation/flash/reference.html#MapAction.ACTION_PAN_ZOOM_IN You can set it to another value in MapAction, if you do not want double-click-to-zoom. 2. by scrolling wheel, which is governed through enableScrollWheelZoom. 3. by using ZoomControl. You can choose not to use it, since it also cannot prevent zoom up to certain level. However, you can create your simple ZoomLimitControl, and set the range. If you like, fancy it with more appealing appearance. 4. by calling setCenter() to change center and zoom. 5. by calling one of the following 3 methods, setZoom, zoomIn, and zoomOut. You can have brave guess, that Way 2, 3, and 4 may call Way 5 to perform the zoom, so that you can override these functions. However, I believe it may be one of the worst design of this API, if, in this case, the only way to prevent zoom is to override the class. But, the fact is you DO have other ways to prevent zoom, by (1) limiting use of Way1, 2 when the zoom level is about to reach the range limit, and (2) not using default ZoomControl in Way 3. As for Way 4 and 5, the programmatic approaches, you can control it, right? ;-) Juguang On Tue, Jul 14, 2009 at 6:09 PM, Daz <[email protected]> wrote: > > Hi ptrk, > > I also have a need to change the zoom functionality and tried to > "extend the Map class and override zoom". > > I overrode zoomIn() and setZoom() which works when I make a call to > them but, not when I double click the map. > > Are you aware of what zoom methods need to be overridden? > Thanks > > Related post and example page here: > > http://groups.google.com/group/Google-Maps-API/browse_thread/thread/c43e2f02d0aaac6e# > > > > -- ============= Juguang XIAO Beijing, China --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-maps-api-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
