Convert lat/lon to pixels and back
问题 I'm using google maps in my application, and I have a webserver with a databse filled with lat/lon values. I want to mark them on the map, but I also want to cluster them together if they are within a certain pixel-distance of eachother. I figure if I retrieve all my points from the database, I should be able to do something like this (pseudocode): clusters[]; while(count(points)) { cluster[]; point = points.pop(); boundingbox = pixelsToBB(point, pixeldistance, zoomlevel); query = "select *