geocoding

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

前提是你 提交于 2019-11-29 23:49:45
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 *placemark = [[MKPlacemark alloc] initWithPlacemark:topResult]; [self.mapView addAnnotation:placemark];

Which are the best geo Coding APIs available for free? [closed]

跟風遠走 提交于 2019-11-29 23:09:51
I want to use geo coding services in my site which are the APIs available for this, Java based solutions will be preferred and I want to use this in a commercial project so please suggest appropriate options i.e. APIs which can be used in such projects freely.. Before asking this question I have tried searching on net and found that few popular geoCoding APIs are the ones from Google and yahoo. And few answers in SO suggest using Google API (Which seems very popular one), before deciding I want to know is their any other option and what are the available solutions for this ? Even A Link to

Correct address format to get the most accurate results from google GeoCoding API

Deadly 提交于 2019-11-29 23:06:02
Is there any standard format to supply the address string to Google GeoCoding API to get the most accurate results on map. For Eg. following query not giving correct result. http://maps.googleapis.com/maps/api/geocode/xml?address=bloom,Bloomfield,CT,06002,USA&sensor=false Thanks Mandeep I believe the suggested format is: House Number, Street Direction, Street Name, Street Suffix, City, State, Zip, Country The results get less specific the less information you can supply, obviously. In your sample, the geocoder is searching for a street named 'bloom', of which there are similar matches in OH

Calculate point between two coordinates based on a percentage

ⅰ亾dé卋堺 提交于 2019-11-29 19:55:16
问题 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. 回答1: 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 -

Autofill Address + Google Maps API

好久不见. 提交于 2019-11-29 19:54:50
I want to present my users with a text box wherein they can type in their address. As they type their address, I want to provide the users with suggestions/predictions of what address they are trying to type. I'm also concerned about the relevance of this address (e.g. that the address is not an address halfway across the world). Is this possible? I'm using jQuery. You can use Google Places API to have an autocomplete for address. When address is selected, address_components field contains structured address data (e.g. street, city, country) and could be easily converted into separate fields.

Handling geocoding in Firebase?

随声附和 提交于 2019-11-29 19:50:57
问题 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! 回答1: 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

Storing Data from Google Places API

假装没事ソ 提交于 2019-11-29 19:49:43
问题 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,

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

ε祈祈猫儿з 提交于 2019-11-29 17:40:23
问题 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

latitude and longitude bounding box for C#?

早过忘川 提交于 2019-11-29 14:48:59
问题 I just want to find a straightforward, C# class that takes in a starting latitude and longitude and a distance and finds the bounding box (max lat, min lat, max lon, min lon). There are other, similar, questions here on SO but none of them really answer this and the ones that do are not in C#. Help. 回答1: Here's what you are asking for. Kudos to Federico A. Ramponi who wrote the original in Python here. public class MapPoint { public double Longitude { get; set; } // In Degrees public double

How do I query for entities that are “nearby” with the GeoPt property in Google App Engine?

徘徊边缘 提交于 2019-11-29 14:34:42
问题 How should I create a GQL query that returns the nearest entities (from my current location) based on their GeoPt property? Should I just created a 'distance' function that calculates for a set of entities with a reasonably close distance? Thanks ahead of time! 回答1: App Engine doesn't treat GeoPt properties specially - it has no built in spatial indexing. There are a number of third-party libraries that add support for spatial indexing, however. The best one (in my opinion) being geomodel.