Hi all,<div><br></div><div>I&#39;m getting the following error in what used to be functional code <span style="font-family:monospace, sans-serif;font-size:medium;color:rgb(255, 0, 0);white-space:pre-wrap">Result of expression &#39;map&#39; [undefined] is not an object. </span></div>

<div><font color="#FF0000" face="monospace, sans-serif"><span style="font-size:medium;white-space:pre-wrap"><br></span></font></div><div>It&#39;s breaking on the statement map.addLayer(cities). Here&#39;s the exerpted code that I&#39;ve added around this. I can add a stripped down version of the rest, but it&#39;s bulky and I&#39;ve only messed with the following bits. Any suggestions as to what&#39;s causing this error?</div>

<div><br></div><div><font color="#FF0000" face="monospace, sans-serif"><span style="font-size:medium;white-space:pre-wrap"><div><font color="#000000"><span style="font-size:small">var styleMap = new OpenLayers.StyleMap(<span class="Apple-style-span" style="font-size: medium; color: rgb(255, 0, 0); "><font color="#000000"><span style="font-size:small">{&#39;default&#39;:OpenLayers.Util.applyDefaults(</span></font></span></span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">{</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">       label: &#39;${Name}&#39;,             </span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">       strokeWidth:1,</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">       strokeColor:&quot;#CCCCCC&quot;,</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">       fillColor: &quot;green&quot;,</span></font></div><div>
<span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">})</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">}</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">    );</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">};</span></font></div>
<br></span></font></div><span class="Apple-style-span" style="font-family: monospace, sans-serif; font-size: medium; color: rgb(255, 0, 0); white-space: pre-wrap; "><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">var cities = new OpenLayers.Layer.GML </span></font></span><div>
<span class="Apple-style-span" style="font-family: monospace, sans-serif; font-size: medium; color: rgb(255, 0, 0); white-space: pre-wrap; "><font color="#000000"><span style="font-size:small">(&quot;7th Century Cities&quot;, &quot;data/cities.gml&quot;,</span></font></span><div>
<font color="#FF0000" face="monospace, sans-serif"><span style="font-size:medium;white-space:pre-wrap"><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">{</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">styleMap: styleMap,</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">projection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">format: OpenLayers.Format.GML,</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                                </span></font></span><font color="#000000"><span style="font-size:small">label: &quot;${Name}&quot;,</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">}</span></font></div><div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">);</span></font></div>
<div><span style="white-space:pre"><font color="#000000"><span style="font-size:small">                        </span></font></span><font color="#000000"><span style="font-size:small">map.addLayer(cities);</span></font></div>
</span></font></div><div><br></div><div>best and thanks in advance,</div><div><br>-- <br>Nicholas Efremov-Kendall<br>Fulbright Student 2009-2010, Ukraine<br><a href="mailto:nefremov@artsci.wustl.edu" target="_blank">nefremov@artsci.wustl.edu</a><br>

c/o Halyna Yerko<br>Balzaka 92a, Kv 27<br>02232<br>Kyiv, Ukraine<br>(mob) +380963576524<br>
</div>
</div>