[OpenLayers-Users] drag zoom control images

R. Ortner reinhard.ortner at edu.fh-kaernten.ac.at
Tue Nov 6 09:02:30 EST 2007


I´ve exactly the same problem. When i move the slider with the mouse, the
slider stick to my cursor. When i move away from the slider and then go back
with the mouse the slider is still pending on the mousecursor and moves also
out of range.

don´t know how to fix that



Eric Jarvies wrote:
> 
> 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;">
>  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;">
>  http:// 
demo.cubewerx.com.au/openlayers/OpenLayers-2.5/img/slider.png 
> 
> regards,
> 
> eric
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/drag-zoom-control-images-tf4741350.html#a13607226
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list