javascript - How to limit queries for geospatial data? -
i making application creates , populates google map markers based on objects geocoordinates in mongodb. however, checking if there markers within window every time map changed in way. however, queries server , database way more i'd , such want find way limit these queries.
i thinking markers in distance of bounds of map + 1 radians begin with. if adjusted center+distance exceeds original center+distance+1 client query server new markers. however, can't seem wrap head around math of doing this. have math getting radius bounds of map shown.
more guess how determine (with to the lowest degree processing power/memory usage) in javascript when circle (with center (x,y) , radius (r)) , circle b (with center (w,z) , radius (o)) intersect.
thanks in advance!
javascript google-maps mongodb geolocation
No comments:
Post a Comment