I am working on a dashboard using Node.JS/Leaflet.js. I started learning Angular js a few weeks ago. But I am at a medium step in my project.
I am building an interactive map dashboard using:
Now, I am trying to add widgets to my dashboard, where I click on points and fetch information related to each point from DB using Node.js.
I'd like to simplify my problem and consider this example. http:jsfiddle.net/8QHFe/128/
When I hover my mouse on the shape, I get a chart related to every polygon/point on the map.
I am confused! My question is:
Leaflet is a framework for showing and interacting with map data, but it's up to you to provide that data, including a basemap. Leaflet is also not GIS, although it can be combined with tools like CartoDB for GIS-like capabilities.
Leaflet - a JavaScript library for interactive maps. Sep 21, 2022 — Leaflet 1.9 has been released! Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 42 KB of JS , it has all the mapping features most developers ever need.
Support for GIS formatsLeaflet has core support for multiple GIS standard formats, with others supported in plugins.
So this is a great question. I often struggle understanding how to implement mapping packages into Angular. The Plunker below shows one way of doing it, but I am not sure it is the "Angular Way". I would love to hear other people weigh in.
In my last mapping application I did not use AngularLeaflet because I had too many customization to do. (For example turn WMS layers on and off depending upon some variables, swap basemaps on zoom levels, use ESRI layers, etc). That said it looks like a great project and I look forward to using it.
I have one controller for the map and two services.
Who knows, regardless I enjoy using angular so much I cannot see any reason not too. The toughest thing about the way I show is not being able to use angular 2-way binding in the popups. Though that is countered by being able to heavily customize the map without forking the AngularLeaflet project... (maybe I am just too lazy).
Let me know what you think?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With