[Users] How to reference mappanel.map

Robert Buckley robertdbuckley at yahoo.com
Tue Nov 22 15:02:48 CET 2011


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111122/de4c01b9/attachment.htm 


More information about the Users mailing list