Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

Second render does not reinitialize Leaflet #15

Open
gordonwoodhull opened this issue Nov 30, 2015 · 3 comments
Open

Second render does not reinitialize Leaflet #15

gordonwoodhull opened this issue Nov 30, 2015 · 3 comments
Labels

Comments

@gordonwoodhull
Copy link

Originally the code attempted to apply Leaflet twice to the div, resulting in the error

map container is already initialized

#14 fixes the error - are there circumstances where we do need to completely reinitialize Leaflet? In dc.js this is usually a punt where there is code that can't gracefully transform/transition from one kind of data to another.

@gordonwoodhull gordonwoodhull changed the title Second render fails Second render does not reinitialize Leaflet Nov 30, 2015
@aubbi
Copy link

aubbi commented Mar 6, 2019

Hello, has this being fixed??

@gordonwoodhull
Copy link
Author

Hi @aubbi.

Sorry, I think right now you would have to delete the contents of the div and initialize a new dc.leaflet instance into it.

That's pretty much how render would be properly implemented so I don't think you'll notice any performance loss.

@aubbi
Copy link

aubbi commented Mar 7, 2019

Hey @gordonwoodhull ,
I keep getting this error, "map container is already initialized", found this link but after updating my dc.leaflet.js I get another error saying "dc.leafletMarkerChart is not a function" I tried many version of leaflet.markercluster.js. however it works fine without trying to update the map with new data.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants