Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I would like to use the 'Leaflet.markercluster' package in conjuction with the Google Maps API, but I run into the following issue:
On a clean custom visual project I ran:
npm i leaflet@1.3.1 npm i leaflet.markercluster npm i --save @types/leaflet.markercluster
(installation of 'leaflet@1.3.1' is required upon installation of 'leaflet.markercluster')
Then the line (see 'Leaflet.markercluster' package documentation)
var obj = L.masterClusterGroup();
throws the following error:
Property 'masterClusterGroup' does not exist on type 'typeof "C:/pbiviz/testproj/node_modules/@types/leaflet/index"'
I don't understand why it looks at the type script for 'leaflet' and not 'leaflet.markercluster'.
The file 'node_modules\leaflet.markercluster\dist\leaflet.markercluster.js' clearly contains 'MarkerClusterGroup'.
I hope someone can help. This should be easy to replicate since it is on a clean project.
Thanks!
Martijn
Solved! Go to Solution.
Not sure why but it seems to break if either of the following packages are newer than the folling versions:
"@types/leaflet": "^1.0.69", "@types/leaflet.markercluster": "^1.0.0",
Later I realized this does not work on Google Maps and decided to use a combination of:
'js-marker-clusterer' and 'OverlappingMarkerSpiderfier'
Not sure why but it seems to break if either of the following packages are newer than the folling versions:
"@types/leaflet": "^1.0.69", "@types/leaflet.markercluster": "^1.0.0",
Later I realized this does not work on Google Maps and decided to use a combination of:
'js-marker-clusterer' and 'OverlappingMarkerSpiderfier'
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |