Hi Robert,<div><br></div><div>Because here you are not using Ext i think you cannot use Ext.getCmp().</div><div>Instead use:</div><div><br></div><div>document.getElementById('map');</div><div><br></div><div>Cheers,</div>
<div><br></div><div>Hugo<br><br><div class="gmail_quote">On Tue, Nov 22, 2011 at 2:02 PM, Robert Buckley <span dir="ltr"><<a href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><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 face="arial, helvetica, sans-serif" size="2">map = new OpenLayers.Map("map", {</font></div><div><font face="arial, helvetica, sans-serif" size="2"> id: 'map',</font></div>
<div><font face="arial, helvetica, sans-serif" size="2"> projection: new OpenLayers.Projection("EPSG:900913"),</font></div><div><font face="arial, helvetica, sans-serif" size="2"> displayProjection: new OpenLayers.Projection("EPSG:4326"),</font></div>
<div><font face="arial, helvetica, sans-serif" size="2"> units: "m",</font></div><div><font face="arial, helvetica, sans-serif" size="2"> maxResolution: 156543.0339,</font></div><div><font face="arial, helvetica, sans-serif" size="2"> maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),</font></div>
<div><font face="arial, helvetica, sans-serif" size="2"> numZoomLevels: 17,</font></div><div><font 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 face="arial, helvetica, sans-serif" size="2"> geodesic: true</font></div><div><font face="arial, helvetica, sans-serif" size="2"> })]</font></div><div><font face="arial, helvetica, sans-serif" size="2"> });</font></div>
<div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2">How does this work?</font></div>
<div><font face="arial, helvetica, sans-serif" size="2"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2"><br></font></div></div></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>1070-312 Lisboa<br>N 38°43'56.84", W 9°9'35.74"<br>
</div>