I'm using Bing Maps on Windows store app (XAML).
I have the longitude and the latitude and I want to get the address (if it exists) of the location.
How can I do it?
Thanks!
You want to do what is called reverse geocoding. Take a look at the SearchManager class: http://msdn.microsoft.com/en-us/library/dn306041.aspx This will let you reverse geocode your coordinates and get the address.
Alternatively you can also use the Bing Maps REST services:
This would be more work than using the search manager, but wouldn't require loading an interactive map first.
http://msdn.microsoft.com/en-us/library/ff701710.aspx
http://msdn.microsoft.com/en-us/library/jj819168.aspx
http://msdn.microsoft.com/en-us/library/jj870778.aspx
Since it sounds like you are new to using Bing Maps in Windows Store apps I'd recommend downloading a free copy of my eBook on creating location intelligent Windows Store apps. It shows how to do this an a lot more. You can get a copy of it here: http://rbrundritt.wordpress.com/my-book/
Related
It's a general question for any programming language that can use google maps api...
Is there a way i can get specific locations provided by web sites that use google maps with their own location marks or location info.
For example yellow pages will offer locations that you won't get if you search for it simply from the official google maps web site.
What if also this website doesn't provide API to parse data from?
For further example , a web site may have a map having all locations of restaurants in Canada for instance so i want to get the same information in this map to import it in my map inside my application.
The sites you are referring to have the address and geocode information in their own database. They send you the data in response to your request and render it on the map in your browser using the client-side script API that google map provides.
If that's the case and the site didn't provide a public data service, then no, you can't get those data using the normal way.
I am developing Windows Mobile apps using vb.net. And Currently, I managed to get the coordinate, but how to get Location name of the fetched coordinate?
I found this for android, but I can't found any reference for Windows mobile/vb.net.
To get a location name for a geoloocation coordinate you need access to a GIS system like Google MAPS. You can use google API to query information about geo coordinates: https://developers.google.com/maps/documentation/geocoding/
An alternative to google location API is at geonames.org. But you have to start coding or your own web service client (as with google location API). For .net start at http://www.geonames.org/export/client-libraries.html.
You may also use other web services to ask about such information.
Without internet access you may need a navigation software with SDK to provide you information about a coordinate, for example ALK navigation and it's SDK.
I've set up API service account access and that seems to be authenticating and connecting OK using the provided sample code (https://developers.google.com/maps-engine/documentation/oauth/serviceaccount).
I've shared my map with the provided service account email address in the Google Maps Engine UI.
Accessing the API method https://www.googleapis.com/mapsengine/v1/projects I expected to see my map in a returned list of projects visible to the service account. Instead, only an empty projects array is returned.
Ultimately my goal is to access place name and geodata stored within a layer on the map I have created in Maps Engine Lite. Is there a step I have missed or something I have misunderstood about granting API access to a Maps Engine Lite map?
Did you progress with your question?. I got one project in the list but because I singed in for a free Google Maps Engine account. That allows you to créate just one project.
But I was looking for accessing "my places" maps.
It turns out certain features, such as the ones I was looking to use, are only available on the (paid for) Maps Engine, and not "Maps Engine Lite". The API is different.
When you mention that they are just available on the Maps Engine Pro (paid for) version, do you mean that the user who owns the maps has to upgrade or yourself, as a developer that want's to access user's maps, have?.
I wouldn't mind to pay (a reasonable price) for it in order to get my app working again. But I don't think most of my app's users would.
Could you check if it worked that way?
OK, here's what I want to implement and I need your ideas :
Input a geo location by name/address/etc (e.g. London, Oxford Street 20)
Get the point's longitude/latitude
My Questions :
How would you go about that?
Is using Google Maps API (that's what I first thought of) my only solution?
It'd be better if the service used CAN be freely integrated in a commercial app - so any idea is welcome... :-)
What you are trying to do is basically geocoding. Major map providers like Google, Bing and Yahoo (and many more) all offer some form of Geocoding API for you to take advantage of. Check out the following quick links:
Google Maps Geocoding API
Bing Locations API
Yahoo! Maps Web Services (Geocoding API)
Edit: (just saw the objective-c tag)
Note that these are non-native solutions. However, the provided APIs are typically REST-based (with output as xml/json), it shouldn't be hard for you to consume these services to grab the gecoded lat-long that you want from within your app.
There is a built in API for that.
For iOS 5 and newer you can use CLGeocoder and for older version you will need to use some extern libraries.
Just call
- (void)geocodeAddressString:(NSString *)addressString completionHandler:(CLGeocodeCompletionHandler)completionHandler
where you want to get the location. It runs async and in the completionHandler you will get an array of all possible placemarks for your address where the first one is the most accurate. As apple says:
For most geocoding requests, this array should contain only one
entry. However, forward-geocoding requests may return multiple
placemark objects in situations where the specified address could not
be resolved to a single location.
Off topic:
Am I the only one whos first thoughts about Oxford was "What does he mean with this weird Hex value?"
I'm trying to detect current user address using MKReverseGeocoder passing coordinates obtained via CLLocation class. Reading MKReverseGeocoder Class Reference I noticed that
The Google terms of service require that the reverse geocoding service be used in conjunction with a Google map; take this into account when designing your application's user interface.
so I'm wondering if (and eventually how) can I reverse geocode user current location on iPhone OS SDK 3.1.3.
I thought using Google Maps API but the EULA has the same obligation.
Yahoo Maps API is even worse and Microsoft one aren't free.
http://www.geonames.org/ is another free alternative
Well if the EULA of Google has the obligation and you are not following it ( similar topic here), then of course you can't do it.
Still I would advice you to find some alternatives, what about this, it's free and doesn't look bad at all.
a question on geonames:
for retrieving city i must pass north,south,eas,west; there's a way to pass only lat & long for retrieve city? I canno't find method to do...