[OpenLayers-Users] Re: Addming map object in GeoExt window panel

Andreas Hocevar ahocevar at opengeo.org
Fri Mar 2 05:06:34 EST 2012


Hi,

you can also just configure the MapPanel with a map property, which
would be either an OpenLayers.Map instance or the single-argument
constructor argument for an OpenLayers.Map instance. Note that you
shouldn't specify a div config option on the OpenLayers.Map and not
render the map.

Andreas.

On Fri, Mar 2, 2012 at 11:00 AM, emeotero <emeotero at gmail.com> wrote:
> Hi,
> I have defined diferents controls to my map panel, for example nav.next and
> nav.previous. You can try to do someting like it.
> var panel = new OpenLayers.Control.CustomNavToolbar();
>                                nav = new OpenLayers.Control.NavigationHistory();
>                                mapPanel.map.addControl(nav);
>                                nav.activate();
>                                panel.addControls([nav.next, nav.previous]);
>                                mapPanel.map.addControl(panel);
>                                panel.activate();
>                                escala = new OpenLayers.Control.ScaleLine();
>                                mapPanel.map.addControl(escala);
>                                posicion = new OpenLayers.Control.MousePosition();
>                                mapPanel.map.addControl(posicion);
>                                posicion.activate();
>                                infoControl.events.register("getfeatureinfo",this,mostrarInfo);
>                                mapPanel.map.addControl(infoControl);
>                                infoControl.activate();
> http://osgeo-org.1560.n6.nabble.com/file/n4539232/control.png
>
> --
> View this message in context: http://osgeo-org.1560.n6.nabble.com/Addming-map-object-in-GeoExt-window-panel-tp4537963p4539232.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.


More information about the Users mailing list