Ah yes, I used to have this issue. <div><br></div><div>To solve it, instead of calling the variables themselves, call the methods to get them:</div><div><br></div><div><div>var position = results[0].geometry.location;</div>
<div> var x = position.lng();</div><div> var y = position.lat();</div></div><div><br></div><div>hope that helps.</div><div><br></div><div>Toby</div><div><br><br><div class="gmail_quote">
On 17 August 2012 07:37, karsten <span dir="ltr"><<a href="mailto:karsten@terragis.net" target="_blank">karsten@terragis.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not that I know of at least :)<br>
<br>
I am using<br>
<div class="im"><script type="text/javascript"<br>
src="<a href="http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6" target="_blank">http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6</a>"></script><br>
</div>To include the api, have an open aecssible map ,thats all ..<br>
<span class="HOEnZb"><font color="#888888">Karsten<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: Zac Spitzer [mailto:<a href="mailto:zac.spitzer@gmail.com">zac.spitzer@gmail.com</a>]<br>
Sent: Thursday, August 16, 2012 11:30 PM<br>
To: <a href="mailto:karsten@terragis.net">karsten@terragis.net</a><br>
Cc: <a href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br>
Subject: Re: [OpenLayers-Users] OpenLayers and Google v3.6 geocoder x and y<br>
variable name change ?<br>
<br>
are you using an api key and are you violating their TOS?<br>
<br>
On Fri, Aug 17, 2012 at 4:05 PM, karsten <<a href="mailto:karsten@terragis.net">karsten@terragis.net</a>> wrote:<br>
> Hi all,<br>
><br>
> I have been using the Google v3 geocoder <script<br>
> type="text/javascript"<br>
> src="<a href="http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6" target="_blank">http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6</a>"></scri<br>
> pt> in conjunction with OpenLayers in some web gis projects for a<br>
> while very low volume ... Some months ago the geocoder (at least the<br>
> way I out it in) ceased to work correctly and I checked in Firebug<br>
> what was wrong. Apparently Google changed the name of the x and y<br>
> variables for the coordinates . No idea why - but when I updated to<br>
> what I saw in firebug it worked again. Now today (or some days back)<br>
> apparently Google did another change again ..<br>
> Again no idea why<br>
> So my line of code below previous did get me the coordinates I wanted<br>
> to zoom the map to:<br>
><br>
> treffer_zoom(results[0].<a href="http://geometry.location.Sa" target="_blank">geometry.location.Sa</a><br>
> ,results[0].geometry.location.Ra);<br>
><br>
> so Sa and Ra variable names for the coordinates - but now firebugs<br>
> shows that the names are now 'a' and 'ab' - what the heck ?<br>
> Has anyone an idea why this happened, if Google does this on purpose<br>
> to break sites or if there is a better way to avoid this every other<br>
> couple of month to happen ?<br>
><br>
> Cheers<br>
> Karsten<br>
><br>
> Karsten Vennemann<br>
> Principal<br>
><br>
> Terra GIS LTD<br>
> <a href="http://www.terragis.net" target="_blank">www.terragis.net</a><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
><br>
<br>
<br>
<br>
--<br>
Zac Spitzer<br>
Solution Architect / Director<br>
Ennoble Consultancy Australia<br>
<a href="http://www.ennoble.com.au" target="_blank">http://www.ennoble.com.au</a><br>
<a href="http://zacster.blogspot.com" target="_blank">http://zacster.blogspot.com</a><br>
<a href="tel:%2B61%20405%20847%20168" value="+61405847168">+61 405 847 168</a><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div></div></blockquote></div><br></div>