Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obtainEffectiveMapId error #471

Closed
porjo opened this issue Sep 10, 2014 · 3 comments
Closed

obtainEffectiveMapId error #471

porjo opened this issue Sep 10, 2014 · 3 comments

Comments

@porjo
Copy link

porjo commented Sep 10, 2014

I'm getting the following error when switching between 2 controllers which display different maps:

"[AngularJS - Leaflet] - You have more than 1 map on the DOM, you must provide the map ID to the leafletData.getXXX call"

I've replicated the issue here:
http://jsfiddle.net/e02vt8q3/2/

@tombatossals
Copy link
Owner

You're totally right @porjo, I have fixed it and added your example to the "examples" folder:

http://tombatossals.github.io/angular-leaflet-directive/examples/double-map-toggle-example.html

Thanks for reporting

@porjo
Copy link
Author

porjo commented Sep 11, 2014

@tombatossals I'm now seeing a different error (firefox):

DOMException [NotFoundError: "Node was not found"
code: 8
nsresult: 0x80530008
location: http://localhost:3001/bower_components/leaflet/dist/leaflet.js:6]

And one of the 2 maps fails to display (I see a grey background where the map would be). This seems to only occur after you've toggled 2 or 3 times.

Your example page exhibits the same error.

@tombatossals
Copy link
Owner

This was another bug related with the map destroy event, every "ng-if" change the map is destroyed and the map objects were not managed correctly, now is solved.

Thanks

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

No branches or pull requests

2 participants