[OpenLayers-Trac] [OpenLayers] #1243: allow for non-discrete resolution/zoom levels (fractional zoom)
OpenLayers
trac at openlayers.org
Tue Jan 22 05:56:00 EST 2008
#1243: allow for non-discrete resolution/zoom levels (fractional zoom)
----------------------+-----------------------------------------------------
Reporter: tschaub | Owner: tschaub
Type: feature | Status: assigned
Priority: minor | Milestone: 2.6 Release
Component: Map | Version: 2.5
Resolution: | Keywords:
State: |
----------------------+-----------------------------------------------------
Comment (by bartvde):
Hi Tim, another question about this. Why is map.zoomTo not adapted to also
take in floats? When I want to zoom now to a fractional level I have to do
the following detour:
{{{
var zoomLevel = this.map.zoom + (deltaY/this.zoomStopHeight);
var scale = OpenLayers.Util.getScaleFromResolution(
this.map.getResolutionForZoom(zoomLevel), this.map.units );
this.map.zoomToScale(scale);
}}}
Whereas I would want to do:
{{{
var zoomLevel = this.map.zoom + (deltaY/this.zoomStopHeight);
this.map.zoomTo(zoomLevel);
}}}
--
Ticket URL: <http://trac.openlayers.org/ticket/1243#comment:10>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list