reverse-geocoding

Googlemaps Reverse GeoCoding Get Country Name, UK Countries

北战南征 提交于 2019-12-08 07:36:06
问题 I am using google maps Api V3 and using reverse geocoding to find the name of a country clicked on. This appears to work fine for most countries except the countries within the UK. The UK consists of England, Scotland, Wales and Northern Ireland, which are 4 separate countries, but google maps (and most other country things) see them all as just "UK". I need to know which particular country within the UK has been clicked and not just that the UK has been clicked! I am using the following

iPhone reverse geocoding: give all possible streets/suburbs?

送分小仙女□ 提交于 2019-12-08 05:48:23
问题 I know Core Location isnt always accurate on the iPhone. Is there a way to use the location (lat/long) along with the accuracy to then grab all of the possible suburbs/streets in that area? So instead of using the reverse geocoding and having it guess the 'best possible suburb/street, is there a way to make it give an array (or in some other format) of all the possible suburbs/streets that it could consider? Thanks!! 回答1: So, the best approach to do this, is using the Google maps API. For

How can I get the nearest city to geo-coordinates with Go?

☆樱花仙子☆ 提交于 2019-12-07 18:57:00
问题 How do I get a geolocation (e.g. the nearest city) from coordinates (e.g. 49.014,8.4043) with Go? I tried to use golang-geo: package main import ( "log" "github.com/kellydunn/golang-geo" ) func main() { p := geo.NewPoint(49.014, 8.4043) geocoder := new(geo.GoogleGeocoder) geo.HandleWithSQL() res, err := geocoder.ReverseGeocode(p) if err != nil { log.Println(err) } log.Println(string(res)) } but it gives Schloßplatz 23, 76131 Karlsruhe, Germany . I would like Karlsruhe (so: only the city). How

Google reverse geocode doesn't always return a street_address

↘锁芯ラ 提交于 2019-12-06 15:00:20
I'm making a very basic google reverse geocode call like: http://maps.googleapis.com/maps/api/geocode/json?latlng=37.785546,-122.406551&sensor=true ... and lately (I feel this started happening recently) I'm not getting back a street address. For example, I always use to get something like this: { "results": [ { "address_components": ... , "formatted_address": "1 Stockton St, San Francisco, CA 94102, USA", "geometry": ..., "types": [ "street_address" ] }, ... Now I often don't get a street_address, but instead get something like this as the most accurate reverse geocode result: { "results": [

Swift 3: reverseGeocodeLocation does not call its completion handler

我们两清 提交于 2019-12-06 13:33:56
This is my code if loc.latitude != 0.0 && loc.longitude != 0.0 { let loca = CLLocation(latitude: loc.latitude, longitude: loc.longitude) geoCoder.reverseGeocodeLocation(loca) { (placemarks, error) in // this is the last line that is being called var placemark : CLPlacemark! placemark = placemarks?[0] city = (placemark.addressDictionary?["City"] as! String) } } Execution of this code snippet in my app goes right, no runtime errors occurred. However, the last line that is being called is geoCoder.reverseGeocodeLocation(loca){(placemarks, error) I also double checked that loca is not nil. Why

How can I get the nearest city to geo-coordinates with Go?

自闭症网瘾萝莉.ら 提交于 2019-12-06 09:27:15
How do I get a geolocation (e.g. the nearest city) from coordinates (e.g. 49.014,8.4043) with Go? I tried to use golang-geo : package main import ( "log" "github.com/kellydunn/golang-geo" ) func main() { p := geo.NewPoint(49.014, 8.4043) geocoder := new(geo.GoogleGeocoder) geo.HandleWithSQL() res, err := geocoder.ReverseGeocode(p) if err != nil { log.Println(err) } log.Println(string(res)) } but it gives Schloßplatz 23, 76131 Karlsruhe, Germany . I would like Karlsruhe (so: only the city). How do I get only the city? The data you are looking to extract is not returned directly from the library

How to get a User's Current Location Using Google Geocode API and PHP

余生长醉 提交于 2019-12-06 04:46:33
问题 I have created an app with and as part of data collection I would like to capture the user's current location when they access the app and website using php. Ideally, I want to make this as simple as possible. Currently, I have the following script, but it has a default address in it: $fullurl = "http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true"; echo $json; $string .= file_get_contents($fullurl); // get json content $json_a =

Get nearby street addresses within a radius

旧街凉风 提交于 2019-12-05 10:38:28
I would like to retrieve a list of all the street addresses within a small range on a geopoint. A scenario for use is for a user to select his/her current address from a list of addresses (within say 50 meters) of current location, since location retrieval is not going to be accurate enough. I am wondering if that is possible using Google maps API? Otherwise does anyone knows an alternative API that I can use for this purpose? From what I've seen, although the Google maps reverse geocoding service returns a number of "addresses" for a geopoint they are usually just different representations of

Offline reverse geocoding on iOS

雨燕双飞 提交于 2019-12-04 21:11:10
There are lots of existing questions relating to this issue, but I have looked at as many of them as I could find and did not get an answer. I'm trying to perform an offline reverse geocoding lookup on iOS based on a latitude and longitude. I'd like to be able to provide a latitude and longitude, and be provided with the country in which that point lies. I can do this with Geonames (such as: http://api.geonames.org/countryCode?lat=45.03&lng=8.2&username=demo ), but I need a similar ability offline, without Internet functionality on the device. CLLocation does not provide offline services that

Android how to get the street name from an address returned by Geocoder

女生的网名这么多〃 提交于 2019-12-04 11:35:14
问题 I'm using Geocoder in reverse way to get an address from a given lat & lon. Do you know how to get from Address only the street name ? Geocoder geocoder = new Geocoder(AutoFinderMapActivity.this); try { List<Address> addressList = geocoder.getFromLocation(latitude, longitude, 1); if (addressList != null && addressList.size() > 0) { // Help here to get only the street name String adress = addressList.get(0).get...; } } catch (IOException e) { e.printStackTrace(); } Thanks in advance, 回答1: I