Skip to content

Conversation

@yohanboniface
Copy link
Contributor

Just to stay closer from Leaflet own usages.
Thanks!

Yohan

@calvinmetcalf
Copy link
Contributor

when you do it that way then you can't do

var map = L.map('map').addHash();

because it's not in the prototype chain yet, you can only do

var map = L.map('map');
map.addHash();

@calvinmetcalf
Copy link
Contributor

ignore the previous comment, for both ways you have to set view before you can add the hash

@yohanboniface
Copy link
Contributor Author

We just need to add return this; to make it work.
I'll add it ;)

@calvinmetcalf
Copy link
Contributor

no this turns out to be a different issue, you get an error if you do

var map = L.map('map').addHash();

instead of

var map = L.map('map').setView([42.2, -71], 8).addHash();//or wherever

@calvinmetcalf
Copy link
Contributor

yeah my issue was actually part of #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants