google-geocoding-api

Google Geocoding API giving different results to my server and my web browser [duplicate]

南笙酒味 提交于 2019-12-01 06:14:15
This question already has an answer here: Google Maps Web site and API : different results 1 answer I'm using the Google Geocoding API to get the lat/lng co-ordinates for different location searches on my site. The problem is that for areas of London (it might not be restricted to just London that's just where most of our user base is) such as "Waterloo" the geocoding api is returning different results to my server from when i put the url directly in my browser. This is the url that is generated for waterloo: http://maps.googleapis.com/maps/api/geocode/xml?address=waterloo,%20london,%20england

Google Geocoding API giving different results to my server and my web browser [duplicate]

人走茶凉 提交于 2019-12-01 05:01:26
问题 This question already has an answer here : Google Maps Web site and API : different results (1 answer) Closed 6 years ago . I'm using the Google Geocoding API to get the lat/lng co-ordinates for different location searches on my site. The problem is that for areas of London (it might not be restricted to just London that's just where most of our user base is) such as "Waterloo" the geocoding api is returning different results to my server from when i put the url directly in my browser. This

Google places API - How to get regions of a country?

荒凉一梦 提交于 2019-12-01 00:57:50
I've looked again and again on the site for this simple question and didn't find an answer I think it is very generic need Let's say that you have two drop down lists One you want to populate with a list of countries, and once you've selected one - to populate the other with a list of it's regions. Is it even possible with Google Places API? Cheers :) Robert Dodd No, it is not possible with Places API. You have 2 options: Use Another Database There are a few free databases of country/state lists. Have a look at the following questions for some examples: List of Cities by Country https://raw

How to store geocoded address information into the database

我与影子孤独终老i 提交于 2019-11-30 19:12:58
问题 I have a geocode request that loops through multiple addresses in my data base and returns latitude and longitude as well as other information. foreach(var row in data){ <script type="text/javascript" src="https://maps.googleapis.com/maps/api/geocode/json?address=@HttpUtility.UrlEncode(row.ADDRESS1)+@HttpUtility.UrlEncode(row.CITY)+@row.ST+CA&key=???apikey???"></script> } Which turns into a few hundred requests and gives my latitudes and longitudes for each. I need to take the latitude and

How to geocode address by google maps iOS API?

妖精的绣舞 提交于 2019-11-30 09:19:09
I found one way to send request: A Google Maps Geocoding API request takes the following form: https://maps.googleapis.com/maps/api/geocode/outputFormat?parameters where outputFormat may be either of the following values: json (recommended) indicates output in JavaScript Object Notation (JSON); or xml indicates output in XML To access the Google Maps Geocoding API over HTTP, use: But it's really inconvenient, is there any native way in swift? I looked into GMSGeocoder interface and only reverse geocoding can be done by it's API. As others have pointed out, there is not a predefined method to

Maps API keys for geocoding not working anymore?

…衆ロ難τιáo~ 提交于 2019-11-30 06:48:21
It seems that the generated keys in the Google API's console are not working anymore. With different keys (tried it with both server and browser key, however the server key is what I need), generated from different accounts I get constantly the following errors: Error when using server key: { "error_message" : "This site or IP is not authorized to use this API key.", "results" : [], "status" : "REQUEST_DENIED" } Error when using browser key: { "error_message" : "The provided API key is expired.", "results" : [], "status" : "REQUEST_DENIED" } And these are the enabled services on this account

Getting an intersection with Google Places/Geocoding API

扶醉桌前 提交于 2019-11-30 05:15:26
I'm trying to find the two closest streets to a point with the Google Places API (basically to indicate the closest intersection). However, any result will only ever return one "route", if at all. I figure I could do 5 queries in a + or X pattern, but that's hacky, unreliable, and of course will hit the query limit a lot sooner. I am tempted to say that this is a deliberate move because the API is not meant to be used for something like navigation systems (which I'm not trying to do), but I still hope there's a TOS-compliant way to get the intersection. Side note - it seems like specifying

Does the v3 Google Maps Geocoding API have a field that represents accuracy?

强颜欢笑 提交于 2019-11-30 03:58:52
I have some code that I'm porting over from API v2 to v3. In the old code we had an accuracy field that came back in the xml (not sure of the name, but it did represent a confidence level of sorts). In the new API, I don't see any field like that. If I put "Oregon, USA" into the search field I get 5 matches. The first 2 are "Oregon, USA" and "Oregon, OH, USA". They both have "partial_match" = false. This doesn't seem right, one seems partial and one doesn't. Plus, they're both coming back with the same "location_type" (APPROXIMATE). In fact, all matches are showing as not-partial and have same

Cannot get gmaps geocoding data

旧时模样 提交于 2019-11-29 18:18:35
I have a hidden field inside a form: <form> <input id="distance" name="km" type="hidden"> </form> And I just want to populate this field with the distance between 2 addresses, chosen by the user. Then I simply submit it with the form and do the server stuff with it. Here I call the calculateDistance func: $('#my_form_id').on("submit", function (e) { calculateDistance(); // other stuff return true; }); This is how I'm trying to get the distance: function calculateDistance() { var startPoint = $('#main_from_route_input').val(); var endPoint = $('#main_to_route_input').val(); var geocoderStart =

Google Geocoding returning totally different result from Google Map

淺唱寂寞╮ 提交于 2019-11-29 16:02:15
For the location of Charles La Trobe P-12 College,Victoria,Australia Google maps produce the exact location of said college. However, when requested via GEOCODE API, either http://maps.googleapis.com/maps/api/geocode/json?address=Charles+La+Trobe+P-12+College,Victoria,Australia&sensor=false or on their demo page https://developers.google.com/maps/documentation/javascript/examples/geocoding-simple the address above gets a result thats far, far from the exact location. any ideas? The entry on Google Maps is a "place" not a geocoded result. Charles La Trobe P-12 College 235 Kingsbury Dr, Macleod