leaflet-stream
Advanced tools
Comparing version 1.0.1 to 1.1.0
12
index.js
@@ -8,6 +8,5 @@ var L = require('leaflet') | ||
function write(chunk, enc, next) { | ||
var layer = L.geoJson(chunk) | ||
var label = createLabel(chunk.properties) | ||
if(label.length > 0) layer.bindPopup(label) | ||
var layer = L.geoJson(chunk, { | ||
onEachFeature: createPopup | ||
}) | ||
layer.addTo(map) | ||
@@ -20,2 +19,7 @@ next() | ||
function createPopup(feature, layer) { | ||
var label = createLabel(feature.properties) | ||
if(label.length > 0) layer.bindPopup(label) | ||
} | ||
function createLabel(props) { | ||
@@ -22,0 +26,0 @@ if(!props) return '' |
{ | ||
"name": "leaflet-stream", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Pipe geojson into a map", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136702
8
67