reverse-geocoding

How to get city from coordinates?

不打扰是莪最后的温柔 提交于 2019-11-29 06:53:54
I use google maps api 3 to get city from coordinates. I read the ReverseGeocoding but I did not understand how to have the correct city value from this type of result: http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false this Funktion returns the Name of a requested City at lat/long. As this Script is from end of 2012. Worked fine for me that time. Returns "unknown" when the API doesn't find any. function get_api ($lat, $long) { $get_API = "http://maps.googleapis.com/maps/api/geocode/json?latlng="; $get_API .= round($lat,2).","; $get_API .= round($long,2);

How can I change the language of Google Maps on the run?

让人想犯罪 __ 提交于 2019-11-29 02:59:55
问题 I wan't to reverse geocode and get the address in two languages arabic and english so I want to get it in one language then change the language of the API and get the address in the other language, as I can't find a parameter to send to geocoder to determine the language. Any suggestions? 回答1: A language can be selected when you load the API by appending language=XX to the API URL where XX is the two-character language code ( en for English, ar for Arabic, etc.) to the URL in the API call.

Reverse Geocoding Code

二次信任 提交于 2019-11-29 00:35:36
问题 I've been working on putting together the Javavscript code for Reverse Geocoding in Google maps. I thought I'd solved all the issues I had, but I'm still having problems. When I embed the Javascript code within the HTML file it works without any problems. However if I try and run the javascript (with some alterations), as a separate file, the map loads upon opening my form, but when I enter the Lat and Lng co-ordinates and press the relevant button to Reverse Geocode, all that happens is that

Get current location address for android app

泄露秘密 提交于 2019-11-28 16:54:27
I do not need to display a map. However, I need to use the gps/3g network to locate my current positions ADDRESS (not long and lat) this will then be added to a automated sms response to inform a person that I currently cant reply, & the include the string address of my current location. I have the sms stuff working, just need to figure out a method of accessing the gps and pulling an address. I have seen sample code for lat/long. Perhaps I need to convert lat/long into an address within the google maps API? I am unsure howto go about it. Any advice/code snippets/similar tutorials welcome!

Get current location using json

ぐ巨炮叔叔 提交于 2019-11-28 13:00:30
Hi i a m writing an application whih gets the current latitude and longitude and convert it to corrsponding address.i can get the lattitude and longitutde but how to convert it to the corresponding address using json. i am new to json. i tried some sample codes butnot getting the address This is my code import java.io.IOException; import java.util.List; import java.util.Locale; import android.content.Context; import android.location.Address; import android.location.Geocoder; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager;

Retrieving Postal Code with Google Maps Javascript API V3 Reverse Geocode

人盡茶涼 提交于 2019-11-28 05:02:28
I'm trying to submit a query using the postal code to my DB whenever the googlemaps viewport center changes. I know that this can be done with reverse geocoding with something like: google.maps.event.addListener(map, 'center_changed', function(){ newCenter(); }); ... function newCenter(){ var newc = map.getCenter(); geocoder.geocode({'latLng': newc}, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { var newzip = results[0].address_components['postal_code']; } }); }; Of course, this code doesn't actually work. So I was wondering how I would need to change this in order

How to obtain country, state, city from reverseGeocodeCoordinate?

血红的双手。 提交于 2019-11-28 04:23:45
GMSReverseGeocodeResponse contains - (GMSReverseGeocodeResult *)firstResult; whose definition is like: @interface GMSReverseGeocodeResult : NSObject<NSCopying> /** Returns the first line of the address. */ - (NSString *)addressLine1; /** Returns the second line of the address. */ - (NSString *)addressLine2; @end Is there any way to obtain the country, ISO country code, state (administrative_area_1 or corresponding one) from those two strings (valid for all the countries and all the addresses )? NOTE: I tried to execute this piece of code [[GMSGeocoder geocoder] reverseGeocodeCoordinate

Reverse geocoding to return results only in English?

旧城冷巷雨未停 提交于 2019-11-28 01:10:26
Using the code below I'm requesting a reverse geocoding for the current coordinate. Everything works great, except for when the device is set to a different language than English. Example: If the language of the device is Italian, and I'm in Italy, the result for country is "Italia" instead of "Italy". How can I force the results to be only in English, regardless of the language of the device? CLGeocoder *geoCoder = [[CLGeocoder alloc] init]; [geoCoder reverseGeocodeLocation:myCurrentLocation completionHandler:^(NSArray *placemarks, NSError *error) { for (CLPlacemark * placemark in placemarks)

problems with android.location.geocoder

吃可爱长大的小学妹 提交于 2019-11-28 00:13:23
I know there has been a lot of questions on the site about the IOExeption : service not available.....I have checked all the answers i could find on the subject... i'm running it as async task which seems to be working fine but still getting the same exception. I have used isPresent() on previous attempts although it is not in the following code and i am using the same phone. i have the internet permission. i have tried to change target to google api to see if that was the problem but it made no difference. This is a vital part of a forth year project so any help would be serious. ps never

Reverse Geocode Current Location

我是研究僧i 提交于 2019-11-27 23:17:51
Is it possible to reverse Geocode your current location on SDK 3.x? I need to simply get the zip code of the current location. The only examples I've seen use CoreLocation which I dont think was introduced until SDK 4. lukewar You can use MKReverseGeocoder from 3.0 through 5.0. Since 5.0 MKReverseGeocoder is depreciated and usage of CLGeocoder is advised. You should use CLGeocoder if available. In order to be able to extract address information you would have to include Address Book framework. #import <AddressBookUI/AddressBookUI.h> #import <CoreLocation/CLGeocoder.h> #import <CoreLocation