[OpenLayers-Users] drag zoom control images
Eric Jarvies
eric at CSL.com.mx
Sat Nov 3 03:10:54 EDT 2007
brad,
i went to http://mumbai.freemap.in/ , a site that also uses the zoom
bar(the standard issue openlayers zoom bar), and i attempted to
replicate the errors. when holding down the mouse and moving the
slider up and down the bar, after a few passes, the slider indeed
leaves the outer limits of the bar. upon release of the mouse, the
slider will return to it's last position prior to clicking it.
whereas on your site/example, if the indicator has moved outside of
the bar area, either top or bottom, and the mouse is released, it
will stay outside, and if the mouse is not clicked, it will continue
moving, even if switching to another browser window, or another
application all together. upon returning to your map, the slider is
still moving with the mouse, and the only way to make it return to
the zoom bar is to mouse down again inside of the zoom bar area, and
to move the mouse in the respective up or down direction to make the
indicator move inside the bar area, or to simply click on the zoom
bar, in which case the indicator returns to that position, then
immediately jumps a few positions up or down. so i think the bulk of
the problem has to do with your you've structured your images within
your <div> tags. also, the openlayers default zoom bar is shorter
then is the one you created. perhaps you should also double check
your px; values, to make sure everything corresponds.
once you make the above-mentioned fix, that will address the slider
problem not returning to the zoom bar, as well as the slider jumping
to another position on the zoom bar, and then your zoom bar/slider
will be on par with the default zoom bar/slider.
but the underlying issue/bug will still remain, meaning, the slider
is still leaving the zoom bar area when moused-down-and-holding-and-
moving. clearly, this error only occurs when the person
intentionally mouses down and moves up or down out of range of the
bar, so it is intentional by the user, thus it will not occur that
often. but, i would be remiss not to at least make mention of it, so
that it can be corrected, as it seems like an easy fix. should i
file a ticket for this? or is someone with capacity/repository
access listening?
default openlayers zoom bar and slider:
<div id="OpenLayers_Control_PanZoomBar_Zoombarundefined"
style="background-image: url(http://openlayers.org/api/2.2/img/
zoombar.png); left: 13px; top: 81px; width: 18px; height: 121px;
position: absolute;"/>
<div id="OpenLayers_Control_PanZoomBar_Sliderundefined"
style="position: absolute; left: 12px; top: 170px; width: 20px;
height: 9px;">
<img id="OpenLayers_Control_PanZoomBar_Sliderundefined_innerImage"
style="position: relative; width: 20px; height: 9px;" src="http://
openlayers.org/api/2.2/img/slider.png"/>
your zoom bar and slider:
<div id="OpenLayers_Control_PanZoomBar_ZoombarOpenLayers.Map_2"
style="background-image: url(http://demo.cubewerx.com.au/openlayers/
OpenLayers-2.5/img/zoombar.png); left: 13px; top: 81px; width: 18px;
height: 176px; position: absolute;"/>
<div id="OpenLayers_Control_PanZoomBar_SliderOpenLayers.Map_2"
style="position: absolute; left: 12px; top: 203px; width: 20px;
height: 9px;">
<img
id="OpenLayers_Control_PanZoomBar_SliderOpenLayers.Map_2_innerImage"
style="position: relative; width: 20px; height: 9px;" src="http://
demo.cubewerx.com.au/openlayers/OpenLayers-2.5/img/slider.png"/>
regards,
eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071103/37cb01ee/attachment.html
More information about the Users
mailing list