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

Optimizing geojson directive to use addData method #609

Closed
facultymatt opened this issue Jan 19, 2015 · 5 comments
Closed

Optimizing geojson directive to use addData method #609

facultymatt opened this issue Jan 19, 2015 · 5 comments

Comments

@facultymatt
Copy link

Currently the geojson directive works by removing the geojson layer and creating it from scratch on every change.

This is not performant, and is not needed in many cases, for example:

For the first point, we could use the addData API to eliminate the need for removing the entire layer.


Additionally, what is the most performant way to use the directive as it currently exists? Any tips on this?

@newmanw
Copy link

newmanw commented Feb 9, 2015

+1

Great directives, but lacking dynamic support for vector layers

@ghost
Copy link

ghost commented May 3, 2015

+1

@nmccready
Copy link
Contributor

@facultymatt this could be fairly simple in a few ways. Currently I use this directive with watches disabled and explicitly up send in the updated model via create and clean on a directiveControl. The addition of a add / newData method would be trivial. However, it would be better to be consistent so all directiveControls are similar.

We could also add some logic to figure out what the newData is within watches but that too will need to configurable. This is because the more logic comparing in the watch the slower the watch becomes. Therefore should the newData be figured out by the application and if so why use the watch (use directiveControl). I am just thinking out loud here before any code is written.

@nmccready
Copy link
Contributor

This issue was moved to angular-ui/ui-leaflet#43

@tombatossals
Copy link
Owner

I'm going to rework&redesign angular-leaflet-directive to be compatible with Leaflet v1.0. It will mantain almost all its functionality, and will be compatible with the current features of the directive, but I must start from a fresh point, so I'm going to close this issue. If you think it must be worked with the new version, please reopen it.

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

4 participants