-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Add: map marker cluster visualization #1203
Add: map marker cluster visualization #1203
Conversation
@@ -39,6 +39,9 @@ | |||
<script src="/bower_components/canvg/StackBlur.js"></script> | |||
<script src="/bower_components/canvg/canvg.js"></script> | |||
<script src="/bower_components/leaflet/dist/leaflet.js"></script> | |||
<script src="/bower_components/angular-simple-logger/dist/angular-simple-logger.js"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you forgot to remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a dependency from angular-ui/ui-leaflet :/
Thanks! Looking good and definitely will be useful. The points limit is reasonable and it's good you put a "safe guard" in place.
I suggest to review the options and remove the ones that are less likely to be used. Also, let's split it into several tabs, like the charts visualization has. So the less common options won't confuse the "regular" user and be hidden in their own tab.
That should be easy to fix, let's revisit it after implementing the tabs? Btw, do you think it will be possible to merge this with the other map visualization? |
I will try to implement the tabs and remove some options until tomorrow and send the changes. |
Regarding merging with the nowadays solution I think that is a good idea and it was a thing that I was intended to do on the conception. |
I think it is possible to merge (and for sure I do like to help on this), but for now maybe it would be better to do this later in another PR. |
@arikfr, can you help me with the options to be updated on the pre-visualization? |
Sure I'll give it a look. |
Currently limiting the number of points to 6K. This is to do not freeze the machine due to a kind of memory leak. Take a look at: angular-ui/ui-leaflet#19
- change the 'renderTemplate'; - add more options to 'defaultOptions'; - add a set of baselayers options found on [here](https://leaflet-extras.github.io/leaflet-providers/preview/); - ability to set the marker text using a column 'msg' on query; - remove the comments from 'defaultOptions' - log a message if the points exceeds 10k
- remove the sample data and get the configs from visualization obj - breakdown the tag for readability
- get the lat/lon columns from the visualization configs - add 'descColName' option to visualization configs
- Organize options in tabs - Remove the width option
@arikfr, I was thinking about do not call the type of this visualization 'MAP_MARKERCLUSTER'. |
Prefer HTTPS instead of SSH protocol
+1 |
Update markercluster.js - Add default values for 'chunked' options - Fix the https issue requesting the tiles Update markercluster_editor.html - Add tooltip helpers - Remove link to github source projects READMEs
I finally had the time to look into it:
There are two issues here:
While reviewing their code, it looks like 5K LOC that have built in support for many Leaflet's plugins. Including duplicate plugins: like support for 5 different icons plugins, that do pretty much the same thing. The lack of support for "live preview", redundant code and other factors lead me to think of dropping |
As discussed with @WesleyBatista, I'm closing this in favor of #1292, where I implement clustering using Leaflet.markersCluster directly instead of this Angular wrapper. The main reason being that the wrapper doesn't support some features we need (like live preview). |
This pull request adds Leaflet.markercluster visualization, using ui-leaflet directive from angular-ui.
Known issues:
Screenshots
Mobile