[OpenLayers-Users] moving panzoombar?
tino.desjardins at arcor.de
tino.desjardins at arcor.de
Mon Aug 2 08:57:13 EDT 2010
Hey Imran,
I think you need a solution to control the PanZoomBar with a css-style. The PanZoomBar inherits from PanZoom, which getting a absolute position with top:4px and left:4px in the constructor.
A solution is to create an own Control, which inherits from OpenLayers.Control.PanZoomBar. In the constructor you set the position "null" (this.position = null;) At next you override the draw method. I think it must look like:
draw: function(px) {
OpenLayers.Control.PanZoomBar.prototype.draw.apply(this, [new OpenLayers.Pixel(0, 0)]);
}
After this you should be able to control the position in the css:
.olControlPanZoomBar {
position: absolute;
top: 10px;
left: 10px;
}
I think the hardcoded position should be removed in future.
Regards
Tino
----- Original Nachricht ----
Von: Arnd Wippermann <arnd.wippermann at web.de>
An: 'Imran Rajjad' <rajjad at gmail.com>
Datum: 02.08.2010 13:36
Betreff: Re: [OpenLayers-Users] moving panzoombar?
> Try this
>
> map.addControl( new OpenLayers.Control.PanZoomBar(), new
> OpenLayers.Pixel(300,0) );
>
> Arnd
>
> -----Ursprüngliche Nachricht-----
> Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
> Auftrag von Imran Rajjad
> Gesendet: Montag, 2. August 2010 11:56
> An: <users at openlayers.org>
> Betreff: [OpenLayers-Users] moving panzoombar?
>
> Hi list,
>
> I have been looking around in user discusion list and cannot find a way to
> repoistion the pan zoom bar, I`m trying to align it with the right side of
> map instead of left. Now i did this through firebug by changing the style.
> but those variables seem to be coming out of some js file instead of css
> class. is there anyway to overwrite the hardcoded position?
>
> regards,
> Imran
>
> --
> I.R
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
E-Cards: Schon fertig für die ganz Eiligen oder individuell zum Selbstgestalten - für jeden Anlass gibt´s die richtige E-Card auf arcor.de.
http://www.arcor.de/rd/footer.ecard
More information about the Users
mailing list