[OpenLayers-Users] OpenLayers.Control.PanZoomBar : Can I get the Zoom bar (slider) without the Pan buttons?

Andrew de Klerk andrew.deklerk at gmail.com
Wed Sep 17 12:19:20 EDT 2008


As far as I am aware it is not possible through the api, however you could
do something like:

Document.getElementById("OpenLayers_Control_PanZoom_panleft").style.display=
'none';
Etc

Using firebug you can determine what the different div's are called
(panright, pandown etc)


>From what I can see it creates a new div for each WMS layer loaded. 
I did a quick test with the two layers I am loading and did this:
 
document.getElementById("OpenLayers.Control.PanZoomBar_45").style.display='n
one'; 
 
document.getElementById("OpenLayers.Control.PanZoom_68").style.display='none
'; 
 
document.getElementById("OpenLayers_Control_PanZoom_panleft").style.display=
'none';

this hid the left pan. 68 and 45 are loaded first so I could hide the entire
control. This may of course mess up if you start hiding and showing layers 

Hope that helps. Perhaps those more familiar with the code could offer some
alternative suggestions.

Other than that you would either need to create a new control based upon
panzoombar.js, or, simply edit that (but I would not recommend that)

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On
Behalf Of Matthew Pettis
Sent: 17 September 2008 05:29 PM
To: users at openlayers.org
Subject: [OpenLayers-Users] OpenLayers.Control.PanZoomBar : Can I get the
Zoom bar (slider) without the Pan buttons?

[REPOSTING: No answer from first post]
Hi,

I'd like to get the slider that this class creates without getting the
pan buttons.  Can this be done easily?

Thanks,
Matt
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.169 / Virus Database: 270.6.21/1667 - Release Date: 9/17/2008
9:33 AM




More information about the Users mailing list