Accessing the Geocoding service is asynchronous, since the Google Maps
API needs to make a call to an external server. For that reason, you
need to pass a callback method to execute upon completion of the
request. This callback method processes the result(s). Note that the
geocoder may return more than one result.
According to the documentation callback is supposed to be supported.
JQuery adds that callback header so I don't get why Google isn't
honoring it.
*Edit: For reference, the url that my app tries to call is
http://maps.google.com/maps/geo?q=33.8024912,-84.4218782&key=[my key
here]&sensor=false&callback=jQuery16409036452900618315_1335293866369&_=1335 293866469
Is this something on Google's side? Or is something on our side?
Again, this code used to work perfectly.
Other posts that I've seen on StackOverFlow, people are saying that
when this error shows up in means that the server doesn't support
JSONP... What's confusing to me is that this used to work... Did
google change their API?
You're not using the JavaScript Maps API V3 geocoding service. You're
calling an undocumented backend API directly - it's no surprise that it
stopped working.
Throw out your $.ajax call and use the documented methods as described on
the page you referenced and it will work fine.
On Tue, Apr 24, 2012 at 11:24 PM, for gmaps <fayaz.m...@gmail.com> wrote:
> We're trying to get information of a user based on the lat longitude.
> Our code has been working fine until a couple weeks ago when we
> started getting this error.
> Here is our code:
> var reverse_geo_url = "http://maps.google.com/maps/geo?q=" + lat + ","
> + lng + "&key=[key]&sensor=false"
> console.log("Calling " + reverse_geo_url);
> new $.ajax(reverse_geo_url, {
> dataType: "jsonp",
> timeout: 5000,
> success: function (data) {
> // yay
> }
> });
> Problem is that we all of a sudden are getting
> Uncaught SyntaxError: Unexpected token :
> Here is an example response from Google's servers (when I go directly
> to the url)
> Accessing the Geocoding service is asynchronous, since the Google Maps
> API needs to make a call to an external server. For that reason, you
> need to pass a callback method to execute upon completion of the
> request. This callback method processes the result(s). Note that the
> geocoder may return more than one result.
> According to the documentation callback is supposed to be supported.
> JQuery adds that callback header so I don't get why Google isn't
> honoring it.
> here]&sensor=false&callback=jQuery16409036452900618315_1335293866369&_=1335 293866469
> Is this something on Google's side? Or is something on our side?
> Again, this code used to work perfectly.
> Other posts that I've seen on StackOverFlow, people are saying that
> when this error shows up in means that the server doesn't support
> JSONP... What's confusing to me is that this used to work... Did
> google change their API?
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API V2" group.
> To post to this group, send email to google-maps-api@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
I'm getting the same error, it worked fine until a few weeks ago.
Something must have changed on the Google side. It's their old API
version though, says it's deprecated since 2010 I think, not sure why
my developer used that version and not the new one V3. Ugh!
On Apr 24, 11:24 pm, for gmaps <fayaz.m...@gmail.com> wrote:
> Accessing the Geocoding service is asynchronous, since the Google Maps
> API needs to make a call to an external server. For that reason, you
> need to pass a callback method to execute upon completion of the
> request. This callback method processes the result(s). Note that the
> geocoder may return more than one result.
> According to the documentation callback is supposed to be supported.
> JQuery adds that callback header so I don't get why Google isn't
> honoring it.
> *Edit: For reference, the url that my app tries to call ishttp://maps.google.com/maps/geo?q=33.8024912,-84.4218782&key=[my key
> here]&sensor=false&callback=jQuery16409036452900618315_1335293866369&_=1335 293866469
> Is this something on Google's side? Or is something on our side?
> Again, this code used to work perfectly.
> Other posts that I've seen on StackOverFlow, people are saying that
> when this error shows up in means that the server doesn't support
> JSONP... What's confusing to me is that this used to work... Did
> google change their API?
On 27 April 2012 23:59, rymalia <ryanma...@gmail.com> wrote:
> I'm getting the same error, it worked fine until a few weeks ago.
> Something must have changed on the Google side. It's their old API
> version though, says it's deprecated since 2010 I think, not sure why
> my developer used that version and not the new one V3. Ugh!
Same problem as the OP. You're using an undocumented and unsupported URL.
Just change your code to use the documented google.maps.Geocoder methods
and it will work fine (subject to other conditions such as rate limits of
course):
On Fri, Apr 27, 2012 at 3:59 PM, rymalia <ryanma...@gmail.com> wrote:
> I'm getting the same error, it worked fine until a few weeks ago.
> Something must have changed on the Google side. It's their old API
> version though, says it's deprecated since 2010 I think, not sure why
> my developer used that version and not the new one V3. Ugh!
> On Apr 24, 11:24 pm, for gmaps <fayaz.m...@gmail.com> wrote:
> > We're trying to get information of a user based on the lat longitude.
> > Our code has been working fine until a couple weeks ago when we
> > started getting this error.
> > Here is our code:
> > var reverse_geo_url = "http://maps.google.com/maps/geo?q=" + lat + ","
> > + lng + "&key=[key]&sensor=false"
> > console.log("Calling " + reverse_geo_url);
> > new $.ajax(reverse_geo_url, {
> > dataType: "jsonp",
> > timeout: 5000,
> > success: function (data) {
> > // yay
> > }});
> > Problem is that we all of a sudden are getting
> > Uncaught SyntaxError: Unexpected token :
> > Here is an example response from Google's servers (when I go directly
> > to the url)
> > Accessing the Geocoding service is asynchronous, since the Google Maps
> > API needs to make a call to an external server. For that reason, you
> > need to pass a callback method to execute upon completion of the
> > request. This callback method processes the result(s). Note that the
> > geocoder may return more than one result.
> > According to the documentation callback is supposed to be supported.
> > JQuery adds that callback header so I don't get why Google isn't
> > honoring it.
> > *Edit: For reference, the url that my app tries to call ishttp://
> maps.google.com/maps/geo?q=33.8024912,-84.4218782&key=[my key
> here]&sensor=false&callback=jQuery16409036452900618315_1335293866369&_=1335 293866469
> > Is this something on Google's side? Or is something on our side?
> > Again, this code used to work perfectly.
> > Other posts that I've seen on StackOverFlow, people are saying that
> > when this error shows up in means that the server doesn't support
> > JSONP... What's confusing to me is that this used to work... Did
> > google change their API?
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps API V2" group.
> To post to this group, send email to google-maps-api@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
On Saturday, April 28, 2012 8:21:21 PM UTC-5, Michael Geary wrote:
> Same problem as the OP. You're using an undocumented and unsupported URL. > Just change your code to use the documented google.maps.Geocoder methods > and it will work fine (subject to other conditions such as rate limits of > course):
> On Fri, Apr 27, 2012 at 3:59 PM, rymalia <ryan...@gmail.com <javascript:>>wrote:
>> I'm getting the same error, it worked fine until a few weeks ago. >> Something must have changed on the Google side. It's their old API >> version though, says it's deprecated since 2010 I think, not sure why >> my developer used that version and not the new one V3. Ugh!
>> On Apr 24, 11:24 pm, for gmaps <fayaz.m...@gmail.com> wrote: >> > We're trying to get information of a user based on the lat longitude.
>> > Our code has been working fine until a couple weeks ago when we >> > started getting this error.
>> > Here is our code:
>> > var reverse_geo_url = "http://maps.google.com/maps/geo?q=" + lat + "," >> > + lng + "&key=[key]&sensor=false" >> > console.log("Calling " + reverse_geo_url); >> > new $.ajax(reverse_geo_url, { >> > dataType: "jsonp", >> > timeout: 5000, >> > success: function (data) { >> > // yay >> > }});
>> > Problem is that we all of a sudden are getting
>> > Uncaught SyntaxError: Unexpected token : >> > Here is an example response from Google's servers (when I go directly >> > to the url)
>> > Accessing the Geocoding service is asynchronous, since the Google Maps >> > API needs to make a call to an external server. For that reason, you >> > need to pass a callback method to execute upon completion of the >> > request. This callback method processes the result(s). Note that the >> > geocoder may return more than one result.
>> > According to the documentation callback is supposed to be supported. >> > JQuery adds that callback header so I don't get why Google isn't >> > honoring it.
>> > *Edit: For reference, the url that my app tries to call ishttp:// >> maps.google.com/maps/geo?q=33.8024912,-84.4218782&key=[my key
>> here]&sensor=false&callback=jQuery16409036452900618315_1335293866369&_=1335 293866469 >> > Is this something on Google's side? Or is something on our side? >> > Again, this code used to work perfectly.
>> > Other posts that I've seen on StackOverFlow, people are saying that >> > when this error shows up in means that the server doesn't support >> > JSONP... What's confusing to me is that this used to work... Did >> > google change their API?
>> -- >> You received this message because you are subscribed to the Google Groups >> "Google Maps API V2" group. >> To post to this group, send email to google-...@googlegroups.com<javascript:> >> . >> To unsubscribe from this group, send email to >> google-maps-a...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-maps-api?hl=en.