开发者

Geotargetting for "Nearest Restaurant Locator"

For an online ordering system, we figured that we would take the entered address and city, calculate the distance between it and each开发者_C百科 entry in a database of addresses using the Google Maps API.

However the client was told by his previous designer that he needs to use geotargeting for more accuracy. As far as I know, geotargetting is only accurate in getting the user's country, but definitely not precise location.

Is there a problem with the address+city method? And is there any truth to the geotargetting method?


Geo-targeting will provide you with the precise location (coordinates) of the user, if they choose to share it.

You can use the coordinates with Google Maps API to then calculate the distance in the same manner you planned with address of the user or the restaurant. (Google converts any address to a coordinates in it's calculations.)

There is no problem with your address+city method, but it may be easier for users to just share their current location... and not have to enter a current address+city.

Address+city would need to be a fallback if the user is not willing to 'share their current location' via geo-targeting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜