leaflet.markercluster

leaflet markercluster doesn't display

五迷三道 提交于 2021-02-10 20:49:56
问题 I've made a markeckuster to show some address points on my leaflet map and make them cluster: var addressPoints = [ [-37.8210922667, 175.2209316333, "2"], [-37.8210819833, 175.2213903167, "3"], [-37.8210881833, 175.2215004833, "3A"], [-37.8211946833, 175.2213655333, "1"], [-37.8209458667, 175.2214051333, "5"], [-37.8208292333, 175.2214374833, "7"], [-37.8325816, 175.2238798667, "537"], [-37.8315855167, 175.2279767, "454"], [-37.8096336833, 175.2223743833, "176"], [-37.80970685, 175.2221815833

leaflet markercluster doesn't display

两盒软妹~` 提交于 2021-02-10 20:49:14
问题 I've made a markeckuster to show some address points on my leaflet map and make them cluster: var addressPoints = [ [-37.8210922667, 175.2209316333, "2"], [-37.8210819833, 175.2213903167, "3"], [-37.8210881833, 175.2215004833, "3A"], [-37.8211946833, 175.2213655333, "1"], [-37.8209458667, 175.2214051333, "5"], [-37.8208292333, 175.2214374833, "7"], [-37.8325816, 175.2238798667, "537"], [-37.8315855167, 175.2279767, "454"], [-37.8096336833, 175.2223743833, "176"], [-37.80970685, 175.2221815833

Leaflet marker cluster automatic

大兔子大兔子 提交于 2021-01-29 19:43:48
问题 In Leaflet, I have too many marker points and I want to regroup them, I've tried the Leaflet.markercluster in Github but I don't understand. Here a part of my code, above I have php code where I collect some data : function initMap() { macarte = L.map('map').setView([lat, lon], 6); L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', { attribution: 'données © <a href="//osm.org/copyright">OpenStreetMap</a>/ODbL - rendu <a href="//openstreetmap.fr">OSM France</a>', minZoom: 1

leaflet - manually cluster markers

谁都会走 提交于 2021-01-28 11:14:32
问题 I need to manually cluster/uncluster few markers on the map (not automatically by zoom) is there a way to tell Leaflet.markercluster which markers to cluster manually and not automatically by zoom. I tried manipulating the L.markerClusterGroup layer internal cluster._gridClusters and cluster._gridUnclustered which holds an array of all the zooms and markers/clusters in each. but changing the objects seems to do nothing and not represented on map. a solution example would be: selectedMarkers =

Count elements in MarkerCluster

妖精的绣舞 提交于 2021-01-27 21:55:45
问题 So I have a couple of stores as layers on my map. All my stores are added to the MarkerCluster and that one is added to map, everything works fine. But I want to display a short info about the store when it's in my viewPort. With usual stores (layers) this was working first try, but the clustered Group does not work :( I started with this one: map.eachLayer(function(layer) but it did not just give me the stores, but alot of things. So I went further to: if(map.getBounds().contains(layer

Uncaught TypeError: Cannot read property 'addLayer' of undefined

Deadly 提交于 2020-12-15 06:07:55
问题 I'm trying to use leaflet markercluster. but when I run it, gives me an error as: Uncaught TypeError: Cannot read property 'addLayer' of undefined my code in functions.js is: for (var i in ODO) { var latlng = L.latLng({ lat: ODO[i].LastX, lng: ODO[i].LastY }); L.marker( latlng ).addTo(map); } var markerClusters = new L.MarkerClusterGroup().addTo(map); for ( var i = 0; i < ODO.length ; i++ ) { var popup = ODO[i].branchcode + '<br/><b>دوره:</b> ' + ODO[i].saleprd + '<br/><b>سال :</b> ' + ODO[i]

Wrong pop up gets opened on marker click

*爱你&永不变心* 提交于 2020-12-15 05:52:33
问题 I have a lot of markers so i cluster them. I got problem where i want to remain my pop up open when user zoom out from the cluster and i found this solution https://jsfiddle.net/sghL4z96/65/ Leaflet Markercluster: Exempt marker from clustering it works fine. But the problem is when the markers are too close on the cluster itself and when i try with this same solution i got this result https://jsfiddle.net/s2mnvL5w/3/ where when i click on the cluster two markers show up.For example if i click

Wrong pop up gets opened on marker click

大憨熊 提交于 2020-12-15 05:52:10
问题 I have a lot of markers so i cluster them. I got problem where i want to remain my pop up open when user zoom out from the cluster and i found this solution https://jsfiddle.net/sghL4z96/65/ Leaflet Markercluster: Exempt marker from clustering it works fine. But the problem is when the markers are too close on the cluster itself and when i try with this same solution i got this result https://jsfiddle.net/s2mnvL5w/3/ where when i click on the cluster two markers show up.For example if i click