Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am creating store locator application. This application should show nearest store to given latitude and longitude.

I can get latitude and longitude. I have data in my Mysql database on server containing information regarding stores and their corresponding latitude and longitudes.

1. Is it secure to connect MySQL database through application(because i have to connect to database to get nearest stores through Haversine formula.). 
2. how can i implement whole process. 

Update:---

Basically i till now i can get my location coordinates like longitude and latitude. I can get nearest stores in table form using googlePlaces but i want to add opening and closing time as well. So i was thinking about connecting mySql database having all information. But main point is getting nearest stores. I have searched a lot and found there is haversine formula for that. i have found tutorial using haversine with php and mysql. but i dont know php.So please suggest me any way with which i can accomplish this.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
229 views
Welcome To Ask or Share your Answers For Others

1 Answer

Normally you would use a webservice (via SOAP, REST, JSON, …) for such tasks, as this would prevent opening the database-server to the public and also makes you independent from the used programming language.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...