Insert zoom controls and zoomToContextExtent off the map

1 message Options
Embed this post
Permalink
Diego Roberto

Insert zoom controls and zoomToContextExtent off the map

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
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: Top 10 - Celebridades - Música - Esportes
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users