Since some hour, the 2.0 Exhibit API has a distance() calculation function which calculates the distance (in meters by default, but "km" and "mile" unit parameters are supported too) between two lat/long coordinates. An example, plotting a few hotels and other accommodations in a wide area around an upcoming German dance festival:
http://exhibit.ecmanaut.googlepages.com/boogie.dev.html I intentionally don't mention exact argument layout here, as it sounded like David might improve on that a bit before it's stable. The page documents what works at present, though. (It depends on the Google Maps API too, so I suspect it requires setting up your Exhibit for map view to work.) That page presently bugs out a little (for trying to use the distance function in a facet description, which David tells me isn't supported quite yet), but you can see it working in table and scatter plot view, and with a bit of luck we might soon get to filter the map view for markers in increasing radii circles around the event, once that is supported. Drop ".dev" from the url if you want to play with the other facets, for now. I also noted that ex:selection for NumericRange facets does not work; neither what is shown ("0 - 500") nor what is reported in the title bar on clicking ("0 to 500") works to list in that attribute. (Maybe the lazy initialization of Exhibit's map marker icons shouldn't be quite as lazy, by the way; the default Google Maps icons show quite noticeably while loading large numbers of markers, as here.) -- / Johan Sundström, http://ecmanaut.blogspot.com/ _______________________________________________ General mailing list [email protected] http://simile.mit.edu/mailman/listinfo/general
