[OpenLayers-Users] Insert zoom controls and zoomToContextExtent off
the map
Diego Roberto
diegorrborges at yahoo.com.br
Wed Nov 4 11:33:01 EST 2009
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,
]);
From what I could see he uses these DISPLAYCLASS that I referred
style that is always built on the map div. olControlPanMap. Sorry if
'm wrong. I'm looking to develop the following: Step control to be
loaded and another div off the map I'm in control I clicking on
I have the same function that enables the control over the less so.
Example of controls:
http://dev.openlayers.org/sandbox/jvanulden/openlayers/examples/extended-layersw\
itcher.html
Through this example could not get the controls to zoom in, zoom out and zoom extent:
http://www.openlayers.org/dev/examples/editingtoolbar-outside.html
So I need off the map.
Thank you for your attention.
Thanks
____________________________________________________________________________________
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20091104/ce18ea0c/attachment.html
More information about the Users
mailing list