diff --git a/labcluster.php b/labcluster.php new file mode 100644 index 0000000..edb768d --- /dev/null +++ b/labcluster.php @@ -0,0 +1,243 @@ + + + + +Create and style clusters + + + + + + + + + + + + + + +
+ + + + + diff --git a/maperogl.php b/maperogl.php index 5d751e6..2d4c32d 100644 --- a/maperogl.php +++ b/maperogl.php @@ -1,238 +1,186 @@ - - - Tupale.co - - - - - + + + + + - -
-
-
-
-
-
- - - - - - -
- - - - - }; - - map.once('style.load', function(e) { - init(); - map.addControl(new mapboxgl.NavigationControl()); - map.on('click', function(e) { - var features = map.queryRenderedFeatures(e.point, { - layers: ['datos-1'] - }); - if (!features.length) { - return; - } - var feature = features[0]; - - var popup = new mapboxgl.Popup() - .setLngLat(map.unproject(e.point)) - .setHTML(feature.properties.description ) - .addTo(map); - }); - - //Hide loading bar once tiles from geojson are loaded - map.on('data', function(e) { - if (e.dataType === 'source' && e.sourceId === 'LosDatos') { - document.getElementById("loader").style.visibility = "hidden"; - } - }) - - // Use the same approach as above to indicate that the symbols are clickable - // by changing the cursor style to 'pointer'. - map.on('mousemove', function(e) { - var features = map.queryRenderedFeatures(e.point, { - layers: ['datos-1'] - }); - map.getCanvas().style.cursor = (features.length) ? 'pointer' : ''; - }); - - }); - -