Hello list,
I try to realise a paneldiv with buttons for the navigation. For example the
zoom and pan and so on.
I made it like this:
var zoomBox = new OpenLayers.Control.ZoomBox({ title: "Zoom In / Rechteckzoom"
});
var navHistory = new OpenLayers.Control.NavigationHistory();
navHistory.previous.title = "letzte Ansicht";
navHistory.next.title = "nächste Ansicht";
map.addControl(navHistory);
// build the featureInfo control (aka query tool/button)
featureInfo = new OpenLayers.Control({
displayClass: "olControlFeatureInfo",
title: "Datenabfrage"
});
// create the panel where the controls will be added
var panel = new OpenLayers.Control.Panel({ defaultControl: featureInfo, div:
document.getElementById("paneldiv")});
panel.addControls([
zoomBox,
new OpenLayers.Control.ZoomBox({
title:"Zoom Out / Rechteckzoom",
displayClass: 'olControlZoomOutBox',
out: true
}),
new OpenLayers.Control.DragPan({title:'Pan', displayClass:
'olControlPanMap'}),
featureInfo,
new OpenLayers.Control.ZoomToMaxExtent({title: "Zoom Max"}),
navHistory.previous,
navHistory.next
]);
// add the panel to the map
map.addControl(panel);
map.addControl(new OpenLayers.Control.MouseDefaults());
It works. But now I will arrange the buttons in another way. I have now 7
buttons in one line, but I will have the buttons in two lines. But I have no
idea where I have to change the code for doing this.
Perhaps it is a bad question but I hope that someone can help me.
A lot of thanks.
Greetings
Hanno
------------------------------------------
Hanno Rahn, Dipl.-Ing. (FH) Geoinformatik
ZHAW Zürcher Hochschule für Angewandte Wissenschaften Umwelt und Natürliche
Ressourcen
Fachstelle Geoinformatik
Grüental, Postfach CH-8820 Wädenswil
Tel +41 (0)58 934 5592
Fax +41 (0)58 934 5580
[email protected]
www.iunr.zhaw.ch/geoinformatik
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users