You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's not display their marker if you zoom too far in. So, reading here for the relationship between zoom and precision, let's modify this block of code to not display tags if their lat/lon precision is quite low and we're zoomed in quite far:
Hi @jywarren , i was thinking of calling a function : map.on('zoomend', function() { });
and
getting the current zoom level : currentZoom = map.getZoom();
and traveling the array of data-items containing people info . and removing them if the degree of precision (number of digits after decimal) is less than the current zoom level using : marker.remove();
What do you think ?
My reading was that publiclab/leaflet-blurred-location-display#102 shows popups for grid (blurred) people. I think that should solve it, as we would no longer show points for blurred locations anyways.
We encourage people to "blur" their location with leaflet-blurred-location, which:
41.13
instead of41.13256
to reduce location precisionlocation:blurred
tag if they want to blur their locationWe display people on maps on this template: https://github.com/publiclab/plots2/blob/master/app/views/map/_peopleLeaflet.html.erb
Which shows up at http://publiclab.org/people
Let's not display their marker if you zoom too far in. So, reading here for the relationship between zoom and precision, let's modify this block of code to not display tags if their lat/lon precision is quite low and we're zoomed in quite far:
plots2/app/views/map/_peopleLeaflet.html.erb
Lines 17 to 26 in 4e16a68
For a listed correlation of zoom and precision so we know when to make this distinction, see:
https://github.com/publiclab/leaflet-blurred-location/blob/e802cdf2cd4d8c7be69cca69f96327f4bc9a1346/src/core/gridSystem.js#L12-L17
The text was updated successfully, but these errors were encountered: