MySQL 5.6 Spatial Reference

المشرف العام

Administrator
طاقم الإدارة
I upgraded MySQL to 5.6 yesterday and imported from OSM data. I verified that the spatial functions are indeed working...which is great! I'm lost where to go now, i.e how to include geodata that can be calculated on and return results.

I have a mobile store-finder application written in JQuery and using Google Maps API. I have stores in my database with addresses (varchar), latitutde/longitude (float). I've developed an API that runs on my server and returns JSON data from my databasen to my mobile app.

Using the Google Maps Javascript API I can post the lat/long bounds of the Google Maps viewport (current viewable map) to my API:

https://developers.google.com/maps/documentation/javascript/reference

A good example of this in action is here;

http://www.w3schools.com/googleAPI/tryit.asp?filename=tryhtml_ref_getbounds

How can I return a list of stores from my database that are within the boundaries of the current Google Map viewport?



أكثر...
 
أعلى