Skip to content
This repository has been archived by the owner. It is now read-only.
Branch: master
Go to file
Code

Files

Permalink
Failed to load latest commit information.

README.md

Leaflet Categorized Layers

Leaflet Control Layers extended for group of base and overlay layers

Copyright 2014 Robbie Trencheny

Tested in Leaflet 0.7

Source code:
Github

#Usage

var baseLayers = {
  "Esri": {
    "WorldStreetMap": L.tileLayer.provider('Esri.WorldStreetMap'),
    "DeLorme": L.tileLayer.provider('Esri.DeLorme'),
  }
};
var overlayLayers = {
  "Weather": {
    "OpenWeatherMap Clouds": L.tileLayer.provider('OpenWeatherMap.Clouds'),
    "OpenWeatherMap Precipitation": L.tileLayer.provider('OpenWeatherMap.Precipitation'),
    "OpenWeatherMap Rain": L.tileLayer.provider('OpenWeatherMap.Rain'),
    "OpenWeatherMap Pressure": L.tileLayer.provider('OpenWeatherMap.Pressure'),
    "OpenWeatherMap Wind": L.tileLayer.provider('OpenWeatherMap.Wind')
  }
};

map.addControl( new L.Control.CategorizedLayers(baseLayers, overLayers, {collapsed: false}) );

#Thanks Thanks to Stefano Cudini for the initial idea in his leaflet-panel-layers project.

About

Leaflet Control Layers extended for group of base and overlay layers

Resources

License

You can’t perform that action at this time.