You can also do this dinamically during execution:
This code can be modified so double click zoom is also affected:
[Code]
function toggleZoom(isChecked) {
if (isChecked) {
map.enableScrollWheelZoom();
} else {
map.disableScrollWheelZoom();
}
}
[/Code]
And don't forget to add the checkbox to yer page:
<body onload="initialize();return false" onunload="GUnload()">
<input type="checkbox" onclick="toggleZoom(this.checked)"
id="scrollWheelZoomToggle" CHECKED/>
<strong> Toggle scroll wheel zoom </strong>
<div id="map_canvas" style="width: 600px; height: 10px"></div>
Hope this also helps. You never know if user will be interested in
zooming in and out at some point.
On Aug 17, 3:23 pm, pdxrlk <[email protected]> wrote:
> I thought this would be too heavy-weight, but it works pretty well in
> practice. Thanks much.
>
> On Aug 16, 2:05 am, Mike Williams <[email protected]> wrote:
>
>
>
> > You might consider removing the zoom control and disabling double click
> > zoom when you don't want the user to zoom:
>
> > // Keep a reference when you add the control
> > var largecontrol = new GLargeMapControl();
> > map.addControl(largecontrol);
>
> > // remove the control when you're busy
> > map.removeControl(largecontrol);
> > map.disableDoubleClickZoom();
>
> > ...
>
> > // add the control back when finished
> > map.addControl(largecontrol);
> > map.enableDoubleClickZoom();- Hide quoted text -
>
> - Show quoted text -
--
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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?hl=en.