[Users] How to reference mappanel.map

Hugo hfpmartins at gmail.com
Tue Nov 22 15:07:33 CET 2011


Hi Robert,

Because here you are not using Ext i think you cannot use Ext.getCmp().
Instead use:

document.getElementById('map');

Cheers,

Hugo

On Tue, Nov 22, 2011 at 2:02 PM, Robert Buckley <robertdbuckley at yahoo.com>wrote:

> Hi,
>
> I want to reference the innerHTML of a map which is in a viewport. I have
> basically tried all the tricks I can think of, but I always get " can´t
> read property of undefined"
>
> my map is has an id of 'map', but I still can´t "Ext.getCmp('map')?
>
>
>
> map = new OpenLayers.Map("map", {
>         id: 'map',
>         projection: new OpenLayers.Projection("EPSG:900913"),
>         displayProjection: new OpenLayers.Projection("EPSG:4326"),
>         units: "m",
>         maxResolution: 156543.0339,
>         maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508,
> 20037508.34),
>         numZoomLevels: 17,
>         controls: [new OpenLayers.Control.MouseDefaults(), new
> OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.MousePosition(),
> new OpenLayers.Control.ScaleLine({
>             geodesic: true
>         })]
>     });
>
>
> How does this work?
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>


-- 
Hugo Martins
LabNT - ISEGI UNL
Campus de Campolide
1070-312 Lisboa
N 38°43'56.84", W 9°9'35.74"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111122/f8929e81/attachment.htm 


More information about the Users mailing list