geocoding

Global location input autocomplete

99封情书 提交于 2019-12-01 22:05:09
I was looking for a plugin to create a smart location form field which has a suggested autocomplete. I was unable to find anything suitable (Google Geocode is too unreliable on its own, and it isn't designed for this) so I built my own. I thought it was crazy that in 2011 an open-source global location input plugin like this didn't exist so set out to give it a go. The demo is here http://labs.unxposed.net/unxposed/geocode/ and is working on Chrome and Firefox 4. Download is here https://github.com/unxposed/geocode There is one major issue I am having with it. Sometimes it works great like so.

D3.js: How to combine 2 datasets in order to create a map and show values on.mouseover?

萝らか妹 提交于 2019-12-01 20:56:11
I would like to combine two datasets on a map in D3.js. For example: 1st dataset: spatial data in .json. 2nd dataset: Data to the areas in .csv --> When you hover on the map a tooltip should show a sentences with some data from the 2nd dataset. I am able to make the map and show a tooltip with data within the .json-file, but how do I insert the 2nd dataset? A new function within my function that creates the map? Do I have to take a completely new way? Should I merge the .json-file with my 2nd dataset before using d3.js? I appreciate any thoughts! :) So, I think what you're asking is how to

google maps api, The provided API key is invalid

怎甘沉沦 提交于 2019-12-01 19:18:28
问题 This is my first time posting a question on stack overflow, really hoping you guys can help. I am trying to use the google maps geocodeing api for the first time and cannot get it to work. The url format I am using is: https://maps.googleapis.com/maps/api/geocode/json?address=LS2+9AQ&sensor=false&key=[MY_API_KEY] In this case I am looking up the uk postcode: LS2 9AQ from a chrome browser. The url does work when I don't use my api key but the limit on the number of allowed calls without the

CLGeocoder geocoding is hopelessly inaccurate

你离开我真会死。 提交于 2019-12-01 15:04:22
I have an App that does forward geocoding (get coordinates given address) to display a bunch of pins on an MKMapView . The app was developed well before iOS supported forward geocoding using CLGeocoder (first available in iOS 5). As such my app uses the Google Maps Geocoding API , which is generally very accurate. Given a full address with a street number it will generally give you the exact location of that address within a couple of metres. I'm doing some updates to my App to support iOS 6 and decided to switch from using the Google API to using CLGeocoder provided the app was running on iOS

How to display additional information in Google Maps autocomplete suggestions?

只谈情不闲聊 提交于 2019-12-01 13:52:41
问题 I am using Google Places autocomplete to select cities by name. Currently it displays only the city name and the country it belongs to, in the suggestions drop down. I have checked and found that the "address_components" object, that gets populated when a city is selected, has additional attibutes like state/province and other parts of the address. So, it is clear that the Google's API provide additional information other than merely the city and country names. What I am trying to achieve is,

Google Map geocoder not as accurate as a Google maps

廉价感情. 提交于 2019-12-01 13:49:38
I have a database containing addresses that are accurate to building level. When I put these manually into Google Map's search, Google Maps finds them no problem - the markers appears right over the correct building. However, when I pass these same addresses to the Google Maps API geocoder using the below code, the markers show up only on the street and not the building. How do I increase the accuracy? HTML/PHP: <div id="addressline"><?php echo theaddress(); ?></div> JS: function myGeocodeFirst() { geocoder = new google.maps.Geocoder(); geocoder.geocode( {'address': document.getElementById(

Techniques for offline reverse geocoding on a mobile device?

流过昼夜 提交于 2019-12-01 13:42:32
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 when offline from within my application, passing in the GPS coordinates, and having it return the country

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

99封情书 提交于 2019-12-01 12:56:01
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 question, does the Google Maps API always include a Geocoder? According to the Google Maps docs , "The

Geocoder.getFromLocationName() throws “Service not available” exception on Android 4 with Google Maps V2

自作多情 提交于 2019-12-01 12:39:41
The method Geocoder.getFromLocationName() throws the exception Service not available on Android 4.1, even if GooglePlayServicesUtil.isGooglePlayServicesAvailable() returns SUCCESS and Geocoder.isPresent() returns true . Is there any official example for geocoding in the new Google Maps v2 API? Geocoder is not related to Google Maps Android API v2. You may want to use Google Geocoding API directly instead of Geocoder , which gives you limited amount of data and might be affected by device or Android version specific problems. try this ..... public JSONObject getLocationFormGoogle(String

Geocoding multiple addresses in one model

社会主义新天地 提交于 2019-12-01 11:54:13
问题 I am trying to geocode 2 addresses in a model using geocoder and I can't get gem to work as I want to. Here is the code that I am applying to my model: class Sender < ActiveRecord::Base validates_presence_of :source_address validates_presence_of :destination_address geocoded_by :source_address, :latitude => :latitude1, :longitude => :longitude1 geocoded_by :destination_address, :latitude2 => :latitude2, :longitude2 => :longitude2 def update_coordinates geocode [latitude1, longitude1,