I am trying to get location using PINCODE/ZIPCODE ex:560001 (Bangalore pincode).I am getting the location when I enter the ADDRESS , STATE & COUNTRY, but unable to get using pincode/zipcode. It displays UNKNOWN address.. can we find LOCATION using PINCODE ??
You can find a location (latitude, longitude) using any piece of address information but at the cost of accuracy.
Now obviously you can have a lat long corresponding individually to a
country, state, city, zip , address, etc and each will be more and more accurate, the more information you use.
Having said that, which GPS app are you using and to do what?
If the task is to find say restaurants, providing pincode should be enough.
but if you want to route from point A to point B , providing destination pincode will be hardly useful it wont pin point your exact location.
UPDATE
You can find points of interest like restaurants, banks etc, you can use google places api. You can search by just providing the pin code. refer to the following documentation:
https://developers.google.com/maps/documentation/places/#PlaceSearches
Related
I'm developing a android application that uses the user location to show a list of street name suggestions around their coordinates, since location retrieval is not going to be accurate enough, and in my application i need the best accurate position.
I tried a lot of approaches, tested google reverse geocoder, but it only gives me only one address, i tried google places api but it's not intended to return addresses, but places, what's not i'm lookin for, i tried findNearBy streets of geonames, but it only gives me street names, i need full data of the streets, like, city, state, country... i tried to use both geonames and google geocoder, getting a list of names, and converting each name into reverse geocoder request, but some street names are also available in another countries, i dont know how to specify a name and a latlng in geocoder request to filter results near specific coordinate.
I tried apis on server-side, which is a django-python server, the scenario is: the user sends their coordinate to server, which will use user location to request to another api's and format the result to the android, but didn't manage to found a good and fast solution.
I've seen a lot of some similar questions on SO but none had the answers I am looking for.
I was wondering as to whether it is possible to get the current location type based on the address. The implementation is that using GPS I will be able to get the address of the current location (similar to dropping pins on Maps and getting the address).
What I would like to know is whether based on the address, can I get the type of the location for example whether it is a movie theater, hospital, a restaurant, shopping mall, etc.
Has anyone tried to implement this?
Yes. You can use the Geocoding API to get the place_id. This is a unique identifer that can be used with other Google APIs, like the Places API. This gives more information (name, ratings, etc).
I have this code to start a navigation activity
String uri = "geo:0,0?q=<lat>,<long>";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uri)));
Google Maps starts and show the correct location on the map but at the bottom panel, instead of the location name to find a route to, I see the latitude and longitude I've sent.
The lat/long data makes it certain about the location I want but shows this info while sending it the location name might show it as I expect but it might get confused with several similar locations. How can I solve this?
You can show a name in the marker in google maps using the following URI:
String uri = "geo:0,0?q=34.99,-106.61(Treasure)";
As explained in android documentation
Not quite sure I fully understand what you're asking for, but it sounds like you want Reverse Geocoding. You can convert your Lat/Lng to a location with it. It generally gives a very detailed response, usually including the street address number, so that's one way to distinguish similar locations.
I'm developing an Android app to integrate with another app.
In this app I need get the current user location and send it to the other app.
I'm getting the latiude and longitude using the following web service:
https://maps.googleapis.com/maps/api/geocode/json?address=Rua+Vergueiro,+1883,+S%C3%A3o+Paulo,+Brazil&sensor=true
The problem is that when the other app receive the latitude an longitude and convert it to address description, an wrong address is showed to the user.
The other app is using the here.com web services to convert the latitude and longitude to address description and Im using googleapi.
Anyone knows tell me what may be happening?
Thanks.
You are geocoding using one service (i.e. Google) and reverse geocoding using a second service (i.e. HERE) and the underlying data is different for each one. As it happens, the location you are looking for is at a junction as shown here
If you run a reverse geocoding search for this location, then the closest location found by HERE is around the corner at Rua Jardim Ivone - the second closest result found by HERE is the same as Google - Rua Vergueiro. As you can see from the picture this is correct - the closest house on the map to the stated location given is actually around the corner.
I am trying to develop an android program that finds the location of the nearest hospital WITHOUT using the internet. Instead, I want it to use a stored map on the android device. Is this feasible? If so, Can anyone refer me to the code?
I successfully developed a similar program that uses google API, meaning it will contact the server and use the internet. I reused the source code in this link.
But in some cases, my user might not have an access to the internet and it is urgent to find the nearest hospital. How can I solve this issue?
Another much simpler solution is to store the coordinates of each hospital in a file.
At App start your read the file in.
Possible file format:
Hospital Name, latitude, longitude, Adress Optional
Then simple calculate the line of sight distance to all hospitals using CLLocation distanceTo(). Then sort by distance.
Take the shortest.
Although this is not road distance, it will work as long as there is no river or rail road inbetween
It's definitely possible.
You'll need to use offline map data - you can get map data from the OpenStreetMap project. I'd recommend letting the user choose which areas to download after initial app installation, and then the data will always be available.
Later on, usage of the location API does not require internet connection. You'll get co-ordinates, with which you can calculate the distance to other co-ordinates (of hospitals..).
Obviously, your challenge will be to create a hard-coded list of hospital locations (albeit update-able, make sure the app can download a new list when internet is present, for example download a XML file).