I've been thinking, and I wanted to propose a change to the final stage of your work, if you're interested and you agree.
We had discussed integrating this with PublicLab.org, but instead of working on that, I was thinking that it could be better to provide a new (fairly big) feature which would make it easier to use this on PublicLab.org, and to defer the integration steps for now.
Once people enter a lot of blurred locations, we will need a way to display them, but as grid squares, you know? Like, let's say 20 people enter locations at varying levels of precision. How do we display them? Showing a marker at the "blurred" location is kind of misleading. Better, perhaps, to:
- have a separate library or a feature of this library that can display a bunch of blurred locations on a Leaflet map
- have it display a Graticule, and shade grid squares that contain one or more blurredLocation
- when you click on a grid square containing blurred locations (i.e. grid square
40.01, 80.01
would include 40.015, 80.016
and 40.01065, 80.010632
), display a popup with a list of those locations that fall within the grid square
- either don't display a
40.01
blurred location if your zoom level is currently to precision 0.001
(that is, more zoomed in) or, show that location for /all/ grid squares that overlap with the blurred location of lower precision (so, that location would show up multiple times)
This is a bit complex to think through, but I think implementation could actually be pretty easy. You could, for example, do (although this seems a bit messy):
// this "constructs" an instance of the library at a center point:
var location = new BlurredLocation({
lat: 41.01,
lon: -85.66
});
location.mode('display'); // disable the location input mode; alternatively something like location.hideInput();
location.displayList([
[35.35, 39.26, "Popup Text"],
[35.35, 39.26, "Popup Text"]
]);
Something like that. You could try to follow syntax in http://leafletjs.com/examples/quick-start/, more or less.
What do you think about this? I know it's a bit change to the end of the project, but I realized a means to display a map will be important to being able to use this library.