diff --git a/.npmignore b/.npmignore index 3c5ed54..69191e4 100644 --- a/.npmignore +++ b/.npmignore @@ -6,3 +6,5 @@ gobblefile.js aux .gobble .gobble-build +yarn.lock +demo diff --git a/README.md b/README.md index 70c67c1..4a624bb 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ With sliced TopoJSON: http://leaflet.github.io/Leaflet.VectorGrid/dist/demo/demo With protobuf `VectorTile`s: http://leaflet.github.io/Leaflet.VectorGrid/dist/demo/demo-vectortiles.html +With clickable points and lines (from protobuf tiles): http://leaflet.github.io/Leaflet.VectorGrid/dist/demo/demo-points.html + ## Using diff --git a/demo/demo-points.html b/demo/demo-points.html index ba674bc..c03712c 100644 --- a/demo/demo-points.html +++ b/demo/demo-points.html @@ -70,7 +70,7 @@ road_label: [], housenum_label: [], }, - interactive: true, + interactive: true, // Make sure that this VectorGrid fires mouse/pointer events getFeatureId: function(f) { return f.properties.osm_id; } @@ -86,7 +86,7 @@ highlight = null; }; var pbfLayer = L.vectorGrid.protobuf(url, vectorTileOptions) - .on('click', function(e) { + .on('click', function(e) { // The .on method attaches an event handler L.popup() .setContent(e.layer.properties.name || e.layer.properties.type) .setLatLng(e.latlng) @@ -113,4 +113,4 @@ map.setView([40.9994639, -74.163208], 15); - \ No newline at end of file +