geocoding

Google Maps V3 geocoding and markers in loop

拜拜、爱过 提交于 2019-11-30 17:47:52
问题 I have some problems with my code, I have a list of airports in a sql database, and I want to create markers for each 1 of those airports. For the address i got ICAO-codes for each airport, an ICAO is unique for each airport I get the data from the Database as array it's is saved in "temp" with an split function and with the for-loop it get them 1 by 1 Geocoding is not the problem, but I don't know why for the TITLE and the on click event it is always the last one from the array which is used

Google maps API geocoding returns same coordinates for two different places

非 Y 不嫁゛ 提交于 2019-11-30 16:35:37
I'm trying to get the coords for these POI but Google Geocoding returns wrong coords, the same coords for both addresses. In the Google Maps they work fine. How should I construct a correct URL for them? https://maps.googleapis.com/maps/api/geocode/json?address=Paleo+Enetiko+Frourio,+Corfu+491+00+Greece https://maps.googleapis.com/maps/api/geocode/json?address=Vlacherna+monastery,+Corfu+491+00+Greece Those are "places" not postal addresses. They both resolve to the same "address" as far as the geocoder is concerned ("Corfu, Greece"). If you need to include the "place name" (you don't have a

How to get the equivalent of the accuracy in Google Map Geocoder V3

风流意气都作罢 提交于 2019-11-30 16:06:39
问题 I want to get geocode from google, and I used to do it with the V2 of the API. Google send in the json a pretty good information, the accuracy, reference here : http://code.google.com/intl/fr-FR/apis/maps/documentation/javascript/v2/reference.html#GGeoAddressAccuracy In V3, Google doesn't seem to send me exactly the same information. There is the array "adresse_component", which seem bigger if the accuracy is better, but not exactly. For example, I have a request accuracy to the street number

Handling geocoding in Firebase?

房东的猫 提交于 2019-11-30 14:59:46
Has anyone tried storing and/or searching on geocodes (e.g. lat/long) in Firebase? This is functionality that is built into MongoDB and as I'm considering using Firebase for our backend instead, I need to know how I'd handle this scenario in Firebase. Thanks! The folks at Firebase recently open-sourced a library that allows you to store and query location data in Firebase. In short, this is very easily accomplished because all keys in Firebase are strings, and Firebase has support for startAt() and endAt() queries that allow you to do the appropriate windowing for geohashes and bounding boxes.

Calculate point between two coordinates based on a percentage

非 Y 不嫁゛ 提交于 2019-11-30 14:01:24
I am looking for a function that returns a point (lat, long) between two points (where I also specify their lat, long) and that point is based on a distance percentage. So, I specify Lat1, Lon1, Lat2, Lon2 and a % on the function and, it returns a point, for example, 20% distant from the first point to the second. Assuming the coordinate is a decimal number. You can use this equation. function midpoint(lat1, long1, lat2, long2, per) { return [lat1 + (lat2 - lat1) * per, long1 + (long2 - long1) * per]; } Return a new desired coordinate of [lat, long], based on the percentage (such as per=0.2

Storing Data from Google Places API

送分小仙女□ 提交于 2019-11-30 14:00:00
Please don't mind if this question sounds a little silly! I am trying to learn more about Google Places API. I am interested in doing an implementation similar to airbnb.com (check the search function at the top, it shows "powered by google" in autosuggest). In our Address Form, we planned to use the autosuggest feature provided by Google Places API for filling the city, region and country (e.g https://www.airbnb.com/rooms/new ) Questions 1) Once someone selects a Place in the "City" field, what exactly are we allowed to store in ourdatabase from the fetched Google data? Can we store the city

Google Maps - converting address to latitude & longitude - PHP backend?

痞子三分冷 提交于 2019-11-30 12:37:10
is it possible to convert (in PHP back-end): <?php $Address = "Street 1, City, Country"; // just normal address ?> to <?php $LatLng = "10.0,20.0"; // latitude & lonitude ?> The code I'm currently using is the default one: <script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false'></script> <script> function initialize() { var myLatlng = new google.maps.LatLng(10.0,20.0); var mapOptions = { zoom: 16, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map'), mapOptions); var marker = new

Finding City and Zip Code for a Location

删除回忆录丶 提交于 2019-11-30 12:36:37
问题 Given a latitude and longitude, what is the easiest way to find the name of the city and the US zip code of that location. (This is similar to https://stackoverflow.com/questions/23572/latitude-longitude-database, except I want to convert in the opposite direction.) Related question: Get street address at lat/long pair 回答1: This is the web service to call. http://developer.yahoo.com/search/local/V2/localSearch.html This site has ok web services, but not exactly what you're asking for here.

geocoding address into coordinates in iphone

≯℡__Kan透↙ 提交于 2019-11-30 12:10:29
问题 I am trying to geocode address into coordinates using following code: CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:@"6138 Bollinger Road, San Jose, United States" completionHandler:^(NSArray* placemarks, NSError* error){ for (CLPlacemark* aPlacemark in placemarks) { // Process the placemark. NSString *latDest1 = [NSString stringWithFormat:@"%.4f",aPlacemark.location.coordinate.latitude]; NSString *lngDest1 = [NSString stringWithFormat:@"%.4f",aPlacemark

How can I plot addresses in Swift, converting address to longitude and latitude coordinates?

白昼怎懂夜的黑 提交于 2019-11-30 11:08:11
问题 In Objective-C this code works fine to plot an address and it finds the longitude and latitude coordinates: NSString *address = @"1 Infinite Loop, CA, USA"; CLGeocoder *geocoder = [[CLGeocoder alloc] init]; [geocoder geocodeAddressString:address completionHandler:^(NSArray* placemarks, NSError* error){ // Check for returned placemarks if (placemarks && placemarks.count > 0) { CLPlacemark *topResult = [placemarks objectAtIndex:0]; // Create a MLPlacemark and add it to the map view MKPlacemark