I can now confirm that error is exclusive to chrome, it works in safari, ie9, opera, and firefox...<br><br><div class="gmail_quote">On Sun, Jun 5, 2011 at 6:35 PM, Nicholas Efremov-Kendall <span dir="ltr"><<a href="mailto:n.e.kendall@gmail.com">n.e.kendall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Correction, that did solve the issue, but it still produces the error in chrome and won't work (in chrome). Firefox places the marker, but won't re-center the map.<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">On Sun, Jun 5, 2011 at 6:17 PM, Nicholas Efremov-Kendall <span dir="ltr"><<a href="mailto:n.e.kendall@gmail.com" target="_blank">n.e.kendall@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eric,<div><br></div><div>Thanks for spotting that. I've fixed it but I'm still getting a strange error in Chrome's javascript console:</div>
<div><div><br></div><div><span style="color:rgb(255, 0, 0);font-family:Consolas, 'Lucida Console', monospace;font-size:12px;line-height:12px;white-space:pre-wrap">Uncaught TypeError: Object function (){var a=null;if(this.baseLayer!=null)a=this.baseLayer.projection;return a} has no method 'getCode'</span><br>
</div><div><span style="color:rgb(255, 0, 0);font-family:Consolas, 'Lucida Console', monospace;font-size:12px;line-height:12px;white-space:pre-wrap"><br></span></div></div><div><span style="font-size:12px;line-height:12px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif">In the OL script at line 311. Does anyone have a suggestion on a different implementation of a button script?</font></span></div>
<div><span style="font-size:12px;line-height:12px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br></font></span></div><div><span style="font-size:12px;line-height:12px;white-space:pre-wrap"><font face="arial, helvetica, sans-serif"><br>
</font></span></div><div><div class="gmail_quote"><div>On Sun, Jun 5, 2011 at 4:09 PM, Eric Lemoine <span dir="ltr"><<a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a>></span> wrote:<br>
</div><div><div></div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>> var markers = new OpenLayers.Layer.Markers("Markers");var map = new OpenLayers.Map('map');function initGIS(){map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
> var mapnik = new OpenLayers.Layer.OSM();map.addLayer(mapnik); map.setCenter(new OpenLayers.LonLat(-90, 38).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),12);<br>
> }<br>
> jQuery(window).ready(function(){jQuery("#btnInit").click(getLoc);});function getLoc(){if (Modernizr.geolocation) { navigator.geolocation.getCurrentPosition(showMap,handle_error);<br>
> } else {yqlgeo.get('visitor',norm_yql_resp);}}<br>
><br>
> function showMap(position){//alert('Lat: ' + position.coords.latitude + ' ' + 'Lon: ' + position.coords.longitude + ' ' + 'Acc: ' + position.coords.accuracy);<br>
> var lonlat = new OpenLayers.LonLat(position.coords.longitude,position.coords.latitude).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject);<br>
<br>
</div>map.getProjectionObject -> map.getProjectionObject()<br>
<br>
no?<br>
<br>
--<br>
Eric Lemoine<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 96<br>
Mail : <a href="mailto:eric.lemoine@camptocamp.com" target="_blank">eric.lemoine@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div></div></div><br></div>
</blockquote></div><br>
</div></div></blockquote></div><br>