google-geocoder

google maps geocoder - point on a street

别来无恙 提交于 2019-12-12 05:15:32
问题 If I use google maps geocoder to find a point of an address - I usually get a point in the middle of the building (roof top) example: https://maps.google.com/maps?q=350+Alabama+Street,+San+Francisco,+CA,+United+States&hl=en&ll=37.764842,-122.412077&spn=0.001497,0.002661&sll=37.794661,-122.425718&sspn=0.001496,0.002661&oq=350%2BAlabama%2BStreet&hnear=350+Alabama+St,+San+Francisco,+California+94110&t=m&z=19 Geocoder request: http://maps.googleapis.com/maps/api/geocode/json?address=350+Alabama

geoCoder respsone loop - Cannot read property '0' of undefined

混江龙づ霸主 提交于 2019-12-12 04:57:37
问题 I am sending a lon/lat to google geocoder and getting a response data that trying to break into variabels, the response look like this: this is my code: getFormattedAddress(result) { const arrResult = result.address_components; let itemRoute = ''; let itemLocality = ''; let itemCountry = ''; let itemPc = ''; let itemSnumber = ''; for(let address_item in arrResult) { if (address_item.types[0] == "route") { console.log(i + ": route:" + address_item.long_name); itemRoute = address_item.long_name

Using Geocoder to make an address the center of a google map

那年仲夏 提交于 2019-12-12 03:17:00
问题 I'm trying to write a program that finds the respective values latLng for an address and then using that for the center of the map. Here is my code so far, however the main problem I am having is getting the values of back from the geocoder. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps Geocoding Demo</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> </head> <body> <div

IOException when using gocoder: Timed out waiting for response from server

久未见 提交于 2019-12-12 02:54:13
问题 I've been developing and Android App that uses Google's geocoder to translate different latitudes and longitudes to human readable addresses but just a few minutes ago I've been getting an IOException with the following message "Timed out waiting for response from server". Is anyone else facing the same problem? I know that in January of this year, a similar issue occured with the geocoder API and was a Google's issue. I haven't changed anything related to the use of the geocoder in the

Reading address from form and outputting longitude & latitude

落花浮王杯 提交于 2019-12-12 02:34:26
问题 I'm quite new to JavaScript and am currently playing around with it and practicing trying to get a Google-geocoder function to print out the longitude and latitude in text fields. I'm sure the code I have contains errors etc. Anyhow, the JS code I have (GeoCoder.js) looks like this: function codeAddress() { var geocoder = new google.maps.Geocoder(); var address = document.getElementById("address").value; geocoder.geocode( {'address': address}, function(results, status) { if(status == google

Android Geocoder not returning City

a 夏天 提交于 2019-12-11 21:20:59
问题 I need help. Im stuck in getting cityname using Geocoder api. Anthing that I did wrong here. One thing that work is if I used this in the onLocationChanged(Location loc). However that require me to update my coordinate by moving around. I only want to use coordinate from network. Any help is very much appreciated. public void DisCityName(Location loc){ /*----------to get City-Name from coordinates ------------- */ String cityName=null; Geocoder gcd = new Geocoder(getBaseContext(), Locale

How do cross domain requests work in IE8?

寵の児 提交于 2019-12-11 19:41:40
问题 How do cross domain requests work in IE8? The target request is to http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true_or_false I tried using $.getJson and $.ajax and they worked for IE9/10 and FF and chrome. However it would not work for IE8. I read some of the posts related to getting XHR working and after enabling the cors flag in ajax settings, I was able to make the call. However, my callback never got invoked. I got it

In my geocoder geocode callback, how do I determine which request the result corresponds to?

萝らか妹 提交于 2019-12-11 19:28:37
问题 I'm looping through about 60 addresses to get them geocoded for use on a Google Map. My callback (below) seems to work well for collecting the locations, but I need to know how to relate them to the address objects I'm looping through. I can't find anything in the geocode response that tells me which of my requests it 'came from.' Is there a way to do that? This is my function: geocode() { var lv_location; var geocoder = new google.maps.Geocoder(); if (geocoder) { geocoder.geocode({'address'

google.maps.Geocoder() getting null in cordova 2.6

混江龙づ霸主 提交于 2019-12-11 19:14:39
问题 I'm using geocoder in my phonegap project. This is working fine in when im using cordova 1.7 but when I changed the cordova version to 2.6, it is returning undefined.. Any idea what am I missing? var geocode= new google.maps.Geocoder() 回答1: use var geocode = new google.maps.Geocoder(); When creating any object of class (of course Javascript has only objects), use new to instantiate. 来源: https://stackoverflow.com/questions/16805614/google-maps-geocoder-getting-null-in-cordova-2-6

Google Maps API query with only ZIP code provides incorrect results

喜欢而已 提交于 2019-12-11 19:09:39
问题 We use the Google Maps API, and when a user inputs a 5 digit ZIP code, the results are correct the vast majority of the time; it treats the input as a ZIP code and returns results based on that location. The problem that has come to our attention is that queries for certain ZIP codes (42025 is our prime example) does NOT return the expected results (Benton, KY). The API call actually returns "status":"ZERO_RESULTS". A similar search on maps.google.com will sometimes produce a positive result,