leaflet.markercluster

How can I Open Multiple Popups in Leaflet Marker at a time

雨燕双飞 提交于 2019-12-10 10:33:45
问题 Map` like this: L.Map = L.Map.extend({ openPopup: function(popup) { this._popup = popup; return this.addLayer(popup).fire('popupopen', { popup: this._popup }); } }); But I am using leaflet. Is there anyway to extent like so that i can prevent closing my marker popup? L.mapbox.accessToken = constant.accessToken; var map = L.mapbox.map('map', 'mapbox.streets', {zoomControl: true}); 回答1: Update Dec 2017 Leaflet popup options have been extended to include { autoClose: false } which has the

Leaflet Markercluster - “this._featureGroup.addEventParent is not a function”

旧时模样 提交于 2019-12-07 10:12:59
问题 I am adding Leaflet.markercluster plugin to my existing Leaflet map. I am getting this error: Uncaught TypeError: this._featureGroup.addEventParent is not a function In relation to the line var locations = L.markerClusterGroup(); . I cannot find any information about what this error might mean. I am linking to the Markercluster JS file, and after Leaflet. Not sure why else it would not be able to find a function. 回答1: That is the error you get when you use Leaflet version < 1 (e.g. 0.7.7 )

How can I Open Multiple Popups in Leaflet Marker at a time

萝らか妹 提交于 2019-12-06 13:45:59
Map` like this: L.Map = L.Map.extend({ openPopup: function(popup) { this._popup = popup; return this.addLayer(popup).fire('popupopen', { popup: this._popup }); } }); But I am using leaflet. Is there anyway to extent like so that i can prevent closing my marker popup? L.mapbox.accessToken = constant.accessToken; var map = L.mapbox.map('map', 'mapbox.streets', {zoomControl: true}); Update Dec 2017 Leaflet popup options have been extended to include { autoClose: false } which has the required effect : var my_marker = L.marker([my_lat, my_lng], {icon: my_icon}) .addTo(map) .bindPopup('My Popup

R - Leaflet Limitations - How many markers does a leaflet map support?

落花浮王杯 提交于 2019-12-02 09:01:14
Data I have a dataframe which contains 35,000 lat/lon locations. The locations have been plotted onto an interactive leaflet map. The Situation I would like to publish the map online via a markdown document. The Problem When I export the map as an html page or in markdown the map is: Laggy Hard to navigate Webpage Loads slowly Questions What is the maximum number of points you plot on a leaflet map without compromising the ability to navigate the map? Would publishing the map as a shiny application help solve the loading speed, the maps lagginess and other performance issues? If not, what

Cluster multiple Layers with markercluster

荒凉一梦 提交于 2019-12-02 00:01:21
I am currently working on a map visualization with the Leaflet library. I am also using the markercluster plugin to cluster my points. So my question now is the following: I have 3 different categories of Markers in 3 different layers. For example Restaurants, Cafes and Bars Layers. And I want to combine all active Layers to a specific cluster. At the moment the entries are clustered separately but I want to cluster them together. The next step would be coloring the cluster according to the childMarkers. E.g. cluster includes restaurant and bar markers => half red/ half green, only restaurants

Plotting 140K points in leafletjs

孤街浪徒 提交于 2019-11-29 02:24:00
I'm new to leafletjs. Been working on cesiumjs for a while and we are trying leaflet now. The main reason for the switch is to see if there's a huge performance difference. In Cesium, I had a collection of primitive points that I plotted. What's the most efficient way of plotting 140K points in leafletjs? Using markers or creating individual little circles? I am also thinking of using the clustering plugin ( http://leafletjs.com/2012/08/20/guest-post-markerclusterer-0-1-released.html ), so please share any thoughts on performance. You have 2 common options: Display your points in a Canvas

Plotting 140K points in leafletjs

本小妞迷上赌 提交于 2019-11-27 16:38:13
问题 I'm new to leafletjs. Been working on cesiumjs for a while and we are trying leaflet now. The main reason for the switch is to see if there's a huge performance difference. In Cesium, I had a collection of primitive points that I plotted. What's the most efficient way of plotting 140K points in leafletjs? Using markers or creating individual little circles? I am also thinking of using the clustering plugin (http://leafletjs.com/2012/08/20/guest-post-markerclusterer-0-1-released.html), so

Using several Marker Cluster Groups displays overlapping Clusters

妖精的绣舞 提交于 2019-11-27 16:26:57
I am using several L.markerClusterGroup({}) 's so that I can switch them in a Layers Control. But the Clusters hide behind each other. I would like to be able to get the total number of both Clusters. What am I missing? The issue is that each Leaflet Marker Cluster Group (i.e. L.markerClusterGroup ) will perform its own clustering and render Clusters irrespective of what other Cluster Groups may display. Therefore if you have some individual Markers (or any point Features) that are in different Cluster Groups but close to each other, these Groups will display Clusters also close to each other,

With Leaflet markercluster, how can I switch between clustered and unclustered without changing zoom level?

时光怂恿深爱的人放手 提交于 2019-11-27 08:02:54
问题 I am using the Leaflet.markercluster plugin to cluster my points. However, users are asking for the functionality to switch between clustered and unclustered views (basically, they want to see all their points at a high zoom). I know that I can disable clustering at a specific zoom level: markers = new L.MarkerClusterGroup({ disableClusteringAtZoom: 8, }) How can I force everything to uncluster when I am further zoomed out, though? 回答1: You would probably be interested in Leaflet

Using several Marker Cluster Groups displays overlapping Clusters

六眼飞鱼酱① 提交于 2019-11-26 18:37:56
问题 I am using several L.markerClusterGroup({}) 's so that I can switch them in a Layers Control. But the Clusters hide behind each other. I would like to be able to get the total number of both Clusters. What am I missing? 回答1: The issue is that each Leaflet Marker Cluster Group (i.e. L.markerClusterGroup ) will perform its own clustering and render Clusters irrespective of what other Cluster Groups may display. Therefore if you have some individual Markers (or any point Features) that are in