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:---开发者_如何学Python
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
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.
精彩评论