diff --git a/Leaflet.groupedlayercontrol/example/advanced.html b/Leaflet.groupedlayercontrol/example/advanced.html new file mode 100644 index 0000000..3297190 --- /dev/null +++ b/Leaflet.groupedlayercontrol/example/advanced.html @@ -0,0 +1,52 @@ + + + + Advanced Example + + + + + + +
+ + + + + + + + diff --git a/Leaflet.groupedlayercontrol/example/basic.html b/Leaflet.groupedlayercontrol/example/basic.html new file mode 100644 index 0000000..f19329a --- /dev/null +++ b/Leaflet.groupedlayercontrol/example/basic.html @@ -0,0 +1,41 @@ + + + + Basic Example + + + + + + + +
+ + + + + + + + diff --git a/Leaflet.groupedlayercontrol/example/exampledata.js b/Leaflet.groupedlayercontrol/example/exampledata.js new file mode 100644 index 0000000..9af334a --- /dev/null +++ b/Leaflet.groupedlayercontrol/example/exampledata.js @@ -0,0 +1,40 @@ +(function() { + + var basemaps = { + Grayscale: L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', { + maxZoom: 18, + attribution: '© OpenStreetMap' + }), + Streets: L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { + maxZoom: 19, + attribution: '© OpenStreetMap' + }) + }; + + var groups = { + cities: new L.LayerGroup(), + restaurants: new L.LayerGroup(), + dogs: new L.LayerGroup(), + cats: new L.LayerGroup() + }; + + L.marker([39.61, -105.02]).bindPopup('Littleton, CO.').addTo(groups.cities); + L.marker([39.74, -104.99]).bindPopup('Denver, CO.').addTo(groups.cities); + L.marker([39.73, -104.8]).bindPopup('Aurora, CO.').addTo(groups.cities); + L.marker([39.77, -105.23]).bindPopup('Golden, CO.').addTo(groups.cities); + + L.marker([39.69, -104.85]).bindPopup('A restaurant').addTo(groups.restaurants); + L.marker([39.69, -105.12]).bindPopup('A restaurant').addTo(groups.restaurants); + + L.marker([39.79, -104.95]).bindPopup('A dog').addTo(groups.dogs); + L.marker([39.79, -105.22]).bindPopup('A dog').addTo(groups.dogs); + + L.marker([39.59, -104.75]).bindPopup('A cat').addTo(groups.cats); + L.marker([39.59, -105.02]).bindPopup('A cat').addTo(groups.cats); + + window.ExampleData = { + LayerGroups: groups, + Basemaps: basemaps + }; + +}());