I am really interested in using Clustering points from Esri leaflet and I tried the following
in my index page, I have these references:
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://community.esri.com//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css" />
<script src="//cdn.jsdelivr.net/leaflet/0.7.3/leaflet.js"></script>
<!-- Load Esri Leaflet from CDN -->
<script src="//cdn-geoweb.s3.amazonaws.com/esri-leaflet/1.0.0-rc.6/esri-leaflet.js"></script>
<!-- Include Leaflet.markercluster via rawgit.com, do not use in production -->
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v0.4.0/dist/MarkerCluster.Default.css"/>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v0.4.0/dist/MarkerCluster.css"/>
<script src="https://cdn.rawgit.com/Leaflet/Leaflet.markercluster/v0.4.0/dist/leaflet.markercluster.js"></script>
<!-- Load Clustered Feature Layer from CDN -->
<script src="http://cdn-geoweb.s3.amazonaws.com/esri-leaflet-clustered-feature-layer/1.0.0-rc.1/esri-leaflet-clustered-feature-layer.js"></script>
<script src="http://js.arcgis.com/3.13/"></script>
And my code is as follow:
map = new Map("map", {
basemap: "streets",
center: [-98.198017, 37.485563],
minZoom: 5,
zoom: 5,
slider:false
});
var fLayerTest = 'http://...fLayer/MapServer/0';
var trees = L.esri.clusteredFeatureLayer(fLayerTest).addTo(map);The code above won't work and also, it does not even give an error.
I am wondering if ArcGIS API is compatible with ESRI Leaflet... in terms of the map reference. Here is the Esri Leaflet I would like to use and at the same time keep the map instance as it is...
Clustering points | Esri Leaflet