Find your nearest pharmacy on Google Maps

I am developing an application that finds the nearest pharmacy, hospital, etc. on Android.

I can get information about my location on the phone, but how can I find places near me? Can google maps search on a map by name?

+3
source share
4 answers

This would be one way to search for the word "Pharmacy."

String url = "http://maps.google.co.uk/maps?q=Pharmacy&hl=en"
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse(url));      intent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
startActivity(intent);

And you can look at maps.google.com for more information on how to define a bounding box for your search.

+2
source

- . , , , .

SELECT id, ( 3959 * acos( cos( radians(37) ) * cos( radians( lat ) ) * cos( radians( lng ) - radians(-122) ) + sin( radians(37) ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < 25 ORDER BY distance LIMIT 0 , 20;

https://developers.google.com/maps/articles/phpsqlsearch

, , Android, , , , ,

+2

, . , lat-lon , lat-lon.

+1

Take a look at the Google Places API, it allows you to search for places around a specific location (lat, long) through a few simple REST endpoints, the one you're probably looking for is Near me search or Radar search

https://developers.google.com/places/documentation/

+1
source

All Articles