On 8 November 2010 20:05, Kandasamy Prasanna <[email protected]> wrote:
> I am thinking to use Google Geocoding services that can be use some
> limited batch geocoding.
> http://code.google.com/apis/maps/documentation/geocoding/index.html
> how to get JSON object from given url?
>
> for example url: 'http://maps.googleapis.com/maps/api/
> geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,
> +CA&sensor=false'
>
> I tried the GetLocations() that did not give stable output for batch
> and i could get up to some where 20 ~ 30 points out of 100.

Calling directly the webservice will not get give any better 'reliability' .

You are probably hitting the query limit. You need to spread your
allocation of queries throughout the whole day, can't just them up in
a batch too quickly.





>
> So to access google webservice I used this function with my Google Map
> API load returns points:
>
>  var googleURL = 'http://maps.googleapis.com/maps/api/geocode/json?
> address=1600+Amphitheatre+Parkway,+Mountain+View,
> +CA&sensor=false';
>                var headID = document.getElementsByTagName("head")[0];
>                var myJSONResult = document.createElement('script');
>                myJSONResult.type = 'text/javascript';
>                myJSONResult.src = googleURL;
>                headID.appendChild(myJSONResult);
>
> but the "myJSONResult" does not have any "results" element or It does
> not get the JSON from google properly.
> so how can I call the webservice and get JSON from url in JavaScript?

geocoding is asynchronous, so you can't expect the calling function to
be able to return directly with  the result.
The code can only get the reply once it (later) comes back.



>
> Secutity mean since we access third paty service from client, there
> may be risk but that is not a main issue.
> Thanks you for your quick replay.
> KP
>
> On Nov 8, 1:10 pm, Rossko <[email protected]> wrote:
>> >  How can I execute this JSON from javascript
>> > and if any better security handling?
>>
>> I wouldn't bother.  As you are loading the maps API, use the provided
>> API geocoding 
>> method.http://code.google.com/apis/maps/documentation/javascript/v2/services...
>>
>> What do you want security for?
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/google-maps-api?hl=en.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to