mapcomm / common-ground_map

An enhanced leaflet map made for re-use (highly commented, built openly) used to show community groups and find "common ground"
http://mapping.community
1 stars 3 forks source link

UX: getting local (set default zoom, geolocate map, and add control scale) #14

Open kidwellj opened 7 years ago

kidwellj commented 7 years ago

We should set default zoom to something a bit closer to local area for a new load of the map (level 9 maybe?); add some code to geolocate the current user and centre the map on their location; and include display with a scale (see: http://leafletjs.com/reference-1.1.0.html#control-scale).

kidwellj commented 7 years ago

Just added commit (master ce1cab5) to set zoom @ 9.

kidwellj commented 7 years ago

Just added commit (c3d7746) to include scale (with imperial!).

kidwellj commented 7 years ago

Looks like this is the ticket for user geolocation: https://github.com/domoritz/leaflet-locatecontrol. But I think we'll want to leave this code commented out for now as it will be annoying for testing until we get more data in England/Wales

kidwellj commented 7 years ago

Re-opening so that we can remember to add scale to display (in "imperial"): i.e. L.control.scale().addTo(map);

danhillcode commented 7 years ago

where did you see this going as at the moment it gets placed underneath the left sidebar by default

kidwellj commented 7 years ago

Can we centre it? LH Sidebar covers it otherwise when it's up. Or add behaviour so that it slides to the right when LH Sidebar overlaps?

danhillcode commented 7 years ago

I have entered it looks decent now.

danhillcode commented 7 years ago

also increased zoom as requested 327-334 are the lines that control this in the index.html file