define([ 'leaflet', 'leaflet.markercluster' ], function(L) { // GeoJSON feature grouping function returnMarker(feature, latlng) { var marker = new L.CircleMarker(latlng,{ color: 'none', fillColor: 'rgba(110, 204, 57, 0.6)', fillOpacity: '1', }); // bindTooltip was introduced in LeafletJS 1.0. try { marker.bindTooltip( feature.properties.name ); } catch (e) { if (console) { console.warn('tooltip skipped (using an old Leaflet?)'); } }; return marker; }; var place = L.geoJson([], { pointToLayer: returnMarker }); return function(data) { place.addData(data); return L.markerClusterGroup().addLayer(place); }; });