()
| 1194 | |
| 1195 | // Export GeoJSON |
| 1196 | function exportGeoJSON() { |
| 1197 | var tempgroup = new L.FeatureGroup(); |
| 1198 | map.addLayer(tempgroup); |
| 1199 | map.eachLayer(function(layer) { |
| 1200 | if (layer instanceof L.Marker || layer instanceof L.Polyline || layer instanceof L.Polygon) { |
| 1201 | layer.addTo(tempgroup); |
| 1202 | } |
| 1203 | }); |
| 1204 | |
| 1205 | // Download GeoJSON locally |
| 1206 | var a = document.createElement("a"); |
| 1207 | var file = new Blob([JSON.stringify(tempgroup.toGeoJSON())], {type: "application/json"}); |
| 1208 | a.href = URL.createObjectURL(file); |
| 1209 | a.download = "geojson"; |
| 1210 | a.click(); |
| 1211 | } |
| 1212 | |
| 1213 | // Render user cursors |
| 1214 | function renderCursors(snapshot, key) { |
nothing calls this directly
no outgoing calls
no test coverage detected