Hello, I need to insert some controls outside the div OL
map. Had success in working with the controls Feature Draw off the map.
Since the controls to zoom in, zoom out and can not zoomToContextExtent
put them off the map, someone could help me?
I try to do more or less like this:
var zoomBox = new OpenLayers.Control.ZoomBox({ title: "Zoom in box" });
// create the panel where the controls will be added
var panel = new OpenLayers.Control.Panel({ defaultControl:
zoomBox });
var zoomToContextExtent = new OpenLayers.Control.Button({
title: "zoom to map extent", displayClass:
"olControlZoomToMaxExtent", trigger: function(){
map.zoomToExtent(context.bounds); }
});
panel.addControls([
zoomBox,
new
OpenLayers.Control.ZoomBox({title:"Zoom out box",
displayClass: 'olControlZoomOutBox', out: true}),
new OpenLayers.Control.DragPan({title:'Drag map',
displayClass: 'olControlPanMap'}),
zoomToContextExtent,
]);