globalbioticinteractions / globalbioticinteractions.github.io

source files for GloBI website
https://globalbioticinteractions.org
MIT License
8 stars 14 forks source link

map recenters on California when enabling the area picker on browse page #26

Open jhpoelen opened 9 years ago

jhpoelen commented 9 years ago

When showing the area picker in http://globalbioticinteractions.org/browse/ page, I find it hard to locate or change the area picker.

use case:

  1. zoom in on Carribean
  2. select area or interest

expected: When selecting an area of interest a rectangle is shown within the shown map. The position and size of rectangle can then be changed using touch / mouse events.

actual: When selecting the "show area picker", the map jumps to California. To select some area in the Carribean, the area needs to be dragged from California to the Carribean (see attached first two images).

suggestion: A leafletjs.org plugin at https://github.com/heyman/leaflet-areaselect/ uses an approach that always centers the area selector in the middle of the map. To change position, the area selector stays fixed, and the map moves underneath it. For an example (within marker clustering) see http://globalbioticinteractions.org/browse/map (see last images).

screen shot 2015-05-11 at 10 55 57 am screen shot 2015-05-11 at 10 56 04 am screen shot 2015-05-11 at 11 04 17 am