tmcw / geojson.net

https://www.placemark.io/
ISC License
150 stars 32 forks source link

Set map center before initializing leaflet-hash #48

Closed jgimbel closed 5 years ago

jgimbel commented 5 years ago

By running

L.hash(map);

before setting the map center

map.setView([20, 0], 2);

The hash center is always overwritten on mount. To resolve this map.setView(...) is moved to before L.hash(map) so L.hash(map) overwrites map.setView(...).

vercel[bot] commented 5 years ago

This pull request is automatically deployed with Now. To access deployments, click Details below or on the icon next to each push.

jgimbel commented 5 years ago

Since this now deploy is not working for me, a test version can be tried here.

tmcw commented 5 years ago

Huh, it looks like Zeit doesn't allow PRs to access secrets even if they're opened by contributors. That's a bit unfortunate, I'll look into it.