<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">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"</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">my map is has an id of 'map', but I still canīt "Ext.getCmp('map')?</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial,
helvetica, sans-serif; font-size: 10pt; "><br></div><div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">map = new OpenLayers.Map("map", {</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> id: 'map',</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> projection: new OpenLayers.Projection("EPSG:900913"),</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> displayProjection: new OpenLayers.Projection("EPSG:4326"),</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> units: "m",</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> maxResolution: 156543.0339,</font></div><div><font
class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> numZoomLevels: 17,</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> controls: [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.ScaleLine({</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> geodesic: true</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"> })]</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif"
size="2"> });</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2">How does this work?</font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font class="Apple-style-span" face="arial, helvetica, sans-serif" size="2"><br></font></div></div></div></body></html>