google-geocoding-api

How can I extrapolate farther along a road?

若如初见. 提交于 2019-11-29 07:35:15
Given realtime location data of a moving device over a short period of time, how can I get a lat/long pair further along this road, say, 2 miles, or even better, 5 minutes worth of driving? I see that I can use Google's Roads API to snap to a road given a lat/long pair https://developers.google.com/maps/documentation/roads/snap , but that only gets me part way there. This will be in an Android app. Given a route represented as a List<LatLng> , this function calculates the point on the route that results from travelling distance meters from origin on that route (using the Google Maps API

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

百般思念 提交于 2019-11-29 01:36:36
问题 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

Cannot get gmaps geocoding data

杀马特。学长 韩版系。学妹 提交于 2019-11-28 12:57:09
问题 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 =

Latitude, Longitude Grabber

我只是一个虾纸丫 提交于 2019-11-28 11:25:16
What I would like to do is create app where when anyone clicks on the map object and two fields get filled with latitude and longitude at every click. Is there sample code of Google Maps V3 JavaScript API (Geocoding API) somewhere out there that does something like that? You can achieve this with google.maps.event' LatLng property: Something like this would show how it works. Here is a JSFiddle Demo: google.maps.event.addListener(map, 'click', function(event){ alert('Lat: ' + event.latLng.lat() + ' Lng: ' + event.latLng.lng()); }); Where map is your google map object. Yes the example is in V2

Google Geocoding returning totally different result from Google Map

社会主义新天地 提交于 2019-11-28 09:12:08
问题 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? 回答1: The entry

How can I extrapolate farther along a road?

心不动则不痛 提交于 2019-11-28 01:32:49
问题 Given realtime location data of a moving device over a short period of time, how can I get a lat/long pair further along this road, say, 2 miles, or even better, 5 minutes worth of driving? I see that I can use Google's Roads API to snap to a road given a lat/long pair https://developers.google.com/maps/documentation/roads/snap, but that only gets me part way there. This will be in an Android app. 回答1: Given a route represented as a List<LatLng> , this function calculates the point on the

Mapping multiple locations with Google Maps JavaScript API v3 and Geocoding API

天涯浪子 提交于 2019-11-27 13:23:05
I'm using Google Maps JavaScript API v3 to generate a map with multiple locations/markers. I only have the address for these locations, not the coordinates, so I'm using the Geocoding API to get the coordinates. I finally got Google's geocoding to work, so the location markers are showing up where they are supposed to be. However, the same content is showing up in every InfoWindow. I seem to be unable to pass the location arrays into the geocode function. (Incidentally, I also tried creating a variable for the geocode results and moving the infoWindow function outside of the geocode function,

Latitude, Longitude Grabber

夙愿已清 提交于 2019-11-27 06:13:17
问题 What I would like to do is create app where when anyone clicks on the map object and two fields get filled with latitude and longitude at every click. Is there sample code of Google Maps V3 JavaScript API (Geocoding API) somewhere out there that does something like that? 回答1: You can achieve this with google.maps.event' LatLng property: Something like this would show how it works. Here is a JSFiddle Demo: google.maps.event.addListener(map, 'click', function(event){ alert('Lat: ' + event

Is It compulsory to enable billing account by June 11, 2018 through credit card information to continue to access Google Maps API?

一笑奈何 提交于 2019-11-27 05:25:27
Per Google, "Beginning on June 11, 2018, you’ll need to enable billing with a credit card and have a valid API key for all projects. This will give you the ability to scale easily with less downtime and fewer performance issues. In addition, we’re simplifying our 18 individual APIs into three products: Maps, Routes, and Places." Source However, Google do not say anywhere whether it's a hard stop or not. What if I don't enable billing account and do not add credit card information. Will I still be able to access Google APIs such as map, directions, geocode after June 11, 2018? According to the

How can I get Chinese words using Google API with JSON?

浪子不回头ぞ 提交于 2019-11-27 04:52:49
问题 I'm using the following link. But, the result is not Chinese. My server is Amazon Web Services (AWS). 回答1: From https://developers.google.com/maps/documentation/geocoding/intro#geocoding The geocoder will do its best to provide a street address that is readable for both the user and locals. To achieve that goal, it will return street addresses in the local language, transliterated to a script readable by the user if necessary, observing the preferred language. All other addresses will be