So this is a great question. I often try to figure out how to implement mapping packages in Angular. The plank below shows one way to do this, but I'm not sure if this is the "Angular Path". I would like to hear other people weigh.
In my last mapping application, I did not use AngularLeaflet because I had too many settings. (For example, turn WMS layers on and off depending on some variables, replace the basic elements at the zoom levels, use ESRI levels, etc.). This suggests that this is a great project, and I look forward to using it.
I have one controller for the card and two services.
- MapCtrl (controller logic for the map)
- MapService will talk to local storage and save the latest view for better UX
- RecordService will get your ajax data to display on the map
So is Angular the best choice?
Who knows, despite the fact that I like to use Angular, I also see no reason. The hardest part, as I show, is not able to use Angular two-way snap in pop-ups. Although this contradicts the fact that it can greatly customize the map without overlaying the AngularLeaflet project ... (maybe I'm too lazy).
Let me know what you think?
Cory silva
source share