Ah yes, I used to have this issue.

To solve it, instead of calling the variables themselves, call the methods
to get them:

var position = results[0].geometry.location;
                    var x = position.lng();
                    var y = position.lat();

hope that helps.

Toby


On 17 August 2012 07:37, karsten <[email protected]> wrote:

> Not that I know of at least :)
>
> I am using
> <script  type="text/javascript"
> src="http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6";></script>
> To include the api, have an open aecssible map ,thats all ..
> Karsten
>
> -----Original Message-----
> From: Zac Spitzer [mailto:[email protected]]
> Sent: Thursday, August 16, 2012 11:30 PM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: [OpenLayers-Users] OpenLayers and Google v3.6 geocoder x and y
> variable name change ?
>
> are you using an api key and are you violating their TOS?
>
> On Fri, Aug 17, 2012 at 4:05 PM, karsten <[email protected]> wrote:
> > Hi all,
> >
> > I have been using the Google v3 geocoder <script
> > type="text/javascript"
> > src="http://maps.googleapis.com/maps/api/js?sensor=false&v=3.6";></scri
> > pt> in conjunction with OpenLayers in some web gis projects for a
> > while very low volume ... Some months ago the geocoder (at least the
> > way I out it in) ceased to work correctly and I checked in Firebug
> > what was wrong. Apparently Google changed the name of the x and y
> > variables for the coordinates . No idea why - but when I updated to
> > what I saw in firebug it worked again. Now today (or some days back)
> > apparently Google did another change again ..
> > Again no idea why
> > So my line of code below previous did get me the coordinates  I wanted
> > to zoom the map to:
> >
> > treffer_zoom(results[0].geometry.location.Sa
> > ,results[0].geometry.location.Ra);
> >
> > so Sa and Ra variable names for the coordinates - but now firebugs
> > shows that the names are now 'a' and 'ab' - what the heck ?
> > Has anyone an idea why this happened, if Google does this on purpose
> > to break sites or if there is a better way to avoid this every other
> > couple of month to happen ?
> >
> > Cheers
> > Karsten
> >
> > Karsten Vennemann
> > Principal
> >
> > Terra GIS LTD
> > www.terragis.net
> >
> >
> > _______________________________________________
> > Users mailing list
> > [email protected]
> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> >
>
>
>
> --
> Zac Spitzer
> Solution Architect / Director
> Ennoble Consultancy Australia
> http://www.ennoble.com.au
> http://zacster.blogspot.com
> +61 405 847 168
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to