geocoding

Status code 0 on Google geocode API from iPhone/sim, but works fine on web (Non English characters)

荒凉一梦 提交于 2019-12-01 11:31:37
Try: http://maps.googleapis.com/maps/api/geocode/json?address =Őrbottyán,Hungary&sensor=true On an iPhone 4 & simulator, -(void)requestFailed:(ASIHTTPRequest *)request { NSLog(@"geocode fail code: %d",[request responseStatusCode]); NSLog(@"geocoding failed: %@",[request responseString]); } 2011-06-01 11:36:27.343 app[1174:307] geocode fail code: 0 2011-06-01 11:36:27.345 app[1174:307] geocoding failed: (null) In a browser I get: "results" : [ { "address_components" : [ { "long_name" : "Őrbottyán", "short_name" : "Őrbottyán", "types" : [ "locality", "political" ] }, { "long_name" : "Pest",

geocoding an IP and save using model forms

♀尐吖头ヾ 提交于 2019-12-01 11:21:38
问题 i have this thing in my models.py file user = models.ForeignKey('auth.User', unique = True) latitude = models.DecimalField(max_digits=8, decimal_places=6) longitude = models.DecimalField(max_digits=8, decimal_places=6) Availability = models.CharField(max_length=8,choices=STATUS_CHOICES, blank= False, null=False) Status = models.CharField(max_length=50, blank = True, null= True) and in forms.py i have class registerForm(forms.ModelForm): class Meta: model=register fields = ('latitude',

Accessing array from outside of geocode loop

心不动则不痛 提交于 2019-12-01 10:57:11
I have managed to geocode upto 10 address and add a marker to the map but I need to access the geocode results outside of the geocode (codeAddress) function. I thought I could push the results to a global variable array (userLat, userLng). Using alerts I can see that the loop does indeed add the results to the array within the function but the array is valueless outside of the function. On a side note, the alert for unsuccessful geocoding should return Address 'i' depending which address had the problem but only displays the last address value of the loop. Maybe the problems are related? I

Techniques for offline reverse geocoding on a mobile device?

我是研究僧i 提交于 2019-12-01 09:54:36
问题 I am working on a mobile mapping application (currently iOS, eventually Android) - and I am struggling with how to best support reverse geocoding from lat/long to Country/State without using an online service. Apple's reverse geocoding API depends on Google as the backend, and works great while connected. I could achieve similar functionality using the Open Street Maps project too, or any number of other web services. What I really want however is to create a C library that I can call even

How can you tell when an Android device has a Geocoder backend service?

二次信任 提交于 2019-12-01 09:43:56
问题 According to the Geocoder documentation, the class provides methods into a backend service which may or may not exist on the device. If the geocoder doesn't exist on the device, theoretically a geocode request will return no results. However, how can one differentiate between no results due to there being no backend geocoder service vs. there being no results because the location makes no sense? My app already requires the Google Maps API, so perhaps this is a moot point; as a secondary

Status code 0 on Google geocode API from iPhone/sim, but works fine on web (Non English characters)

本秂侑毒 提交于 2019-12-01 08:16:17
问题 Try: http://maps.googleapis.com/maps/api/geocode/json?address=Őrbottyán,Hungary&sensor=true On an iPhone 4 & simulator, -(void)requestFailed:(ASIHTTPRequest *)request { NSLog(@"geocode fail code: %d",[request responseStatusCode]); NSLog(@"geocoding failed: %@",[request responseString]); } 2011-06-01 11:36:27.343 app[1174:307] geocode fail code: 0 2011-06-01 11:36:27.345 app[1174:307] geocoding failed: (null) In a browser I get: "results" : [ { "address_components" : [ { "long_name" :

Accessing array from outside of geocode loop

自作多情 提交于 2019-12-01 08:03:05
问题 I have managed to geocode upto 10 address and add a marker to the map but I need to access the geocode results outside of the geocode (codeAddress) function. I thought I could push the results to a global variable array (userLat, userLng). Using alerts I can see that the loop does indeed add the results to the array within the function but the array is valueless outside of the function. On a side note, the alert for unsuccessful geocoding should return Address 'i' depending which address had

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

How can I find the nearest intersection via the Google Maps API?

Deadly 提交于 2019-12-01 04:23:02
How can I find the closest intersection of the street I have coordinates of? For instance, say I have street A running from south to north that is crossed by street X on the north and by street Y on the south. Does the Google Maps API allow for finding coordinates of the nearest crossroad (either X or Y) of street A? I couldn't find it mentioned anywhere. PS: The only solution I am aware of is to guess the lowest number and the highest number of building on the street A and to draw polyline between them. I am not sure about this though. [see comments above] unfortunately, no. even with