Open-Historical-Map-Labs / openhistoricaltiles

First iteration of vector tiles from OHM Planet data
BSD 2-Clause "Simplified" License
3 stars 0 forks source link

Datefilter map: Make URL params more forgiving of missing date #24

Closed gregallensworth closed 6 years ago

gregallensworth commented 6 years ago

URL param is as designed: Black Rock City, 2008-2010

https://openhistoricalmap.github.io/openhistoricaltiles/datefilter/#15.00/40.77470/-119.21600/2008-01-01,2010-12-31/

The URL param parser expects all params, or else will not process any of them. For example, this URL would not even zoom to the location:

https://openhistoricalmap.github.io/openhistoricaltiles/datefilter/#15.00/40.77470/-119.21600/

Make the URL param parser more forgiving, so the date filter is effectively optional and it will still pan & zoom even if not setting a date filter.

gregallensworth commented 6 years ago

Done,. URL strings with and without dates are both supported:

https://openhistoricalmap.github.io/openhistoricaltiles/datefilter/#14.00/40.77140/-119.21957/

https://openhistoricalmap.github.io/openhistoricaltiles/datefilter/#14.00/40.77140/-119.21957/2008-01-01,2008-12-31/