Stars Queen
Stars Queen

Reputation: 21

properties of a place viewed by Google Maps

I am building a site that helps people to find restaurants on the net .. so i want for every restaurant to show a small Google Map Now i'm still building my database, in the table restaurant i have id ,name , phone, website, .... My question is do i have to add other properities to help me locate the place exactly on Google Maps, what are they?

Please note that this is my first time to work with google maps, and i really dont know what do i need exactly to know about a place to represent it on the map. Thanks

Upvotes: 0

Views: 70

Answers (2)

gerardnimo
gerardnimo

Reputation: 1454

There are several ways to locate a place. First, you can do it through latitude and longitude. For this you can use Reverse geocoding which can translate the latitude & longitude into an address. You also have the option of using place_id, it is used to uniquely identify a place in Google Maps. See Places IDs. You also have the option of using the address of the place but I do not recommend it; due to the fact that there can be multiple places with the same name.

As for the properties that is available for the place, you may want to look at Place Details of Places API. This will return details like latitude,longitude, place_id, international_phone_number, opening_hours, permanently_closed, price_level, reviews etc.

Hope this will help you. Good luck!

Upvotes: 0

Sonia John Kavery
Sonia John Kavery

Reputation: 2129

To locate a place in google map, we need latitude and longitude.

for eg. in android ,to mark a location

static final LatLng PERTH = new LatLng(-31.90, 115.86);
Marker perth = mMap.addMarker(new MarkerOptions()
                          .position(PERTH));

here -31.90 and 115.86 are that places latitude and longitude respectively. I think the logic may b same in all platforms

Upvotes: 0

Related Questions