Skip to content

Conversation

@tv
Copy link
Contributor

@tv tv commented Mar 6, 2014

On app that constantly initializes new maps and custom directives on top of it had problems when directives launched before map was ready. Directives then added layers to old, already destroyed map. With this patch, directive detects if it's destroyed from scope's $destroy event and then unresolves itself from leafletData. This could and should be done for other directives too, but for most use cases this should be enough.

Issue discussion at #299

houqp added a commit that referenced this pull request Mar 6, 2014
Cleanup leaflet from leafletData after scope.$destroy
@houqp houqp merged commit 3421972 into tombatossals:master Mar 6, 2014
@houqp
Copy link
Contributor

houqp commented Mar 6, 2014

thank you for the fix :)

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