globalbioticinteractions / globalbioticinteractions.github.io

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

use stable urls with anchors for browse page #27

Closed jhpoelen closed 9 years ago

jhpoelen commented 9 years ago

Suggest to use scheme discussed in #16 in the http://globalbioticinteractions.org/browse pages to make it easy to share a specific state of the browser with others. The "#" style url should be updated whenever spatial or taxonomic search parameters change.

Currently, this is also possible using the "share" functionality, however, a "?" is used in the URL, causing the page to reload when used.

Current: http://www.globalbioticinteractions.org/browse/?&bbox=-125.53344800000002,32.750323,-114.74487299999998,41.574361

Suggest to change to: http://www.globalbioticinteractions.org/browse/#&bbox=-125.53344800000002,32.750323,-114.74487299999998,41.574361

jhpoelen commented 9 years ago

implemented first pass of using hashes to specify a search context in a url.

For example:

Sea otters (Enhydra) interactions around California :

http://www.globalbioticinteractions.org/browse/#interactionType=interactsWith&resultType=json&sourceTaxon=Enhydra&bbox=-125.53344800000002%2C32.750323%2C-114.74487299999998%2C41.574361

Dropped support for lat/lng for sake of simplicity.