Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple tile.layers with control layer? #10

Closed
bevanj opened this issue Sep 23, 2013 · 3 comments
Closed

Add multiple tile.layers with control layer? #10

bevanj opened this issue Sep 23, 2013 · 3 comments

Comments

@bevanj
Copy link

bevanj commented Sep 23, 2013

I was wondering if it is possible to add multiple layers into you fantastic library by doing something similar to below?

var watercolor = new L.StamenTileLayer("watercolor");
var cloudmade = new L.TileLayer("http://{s}.tile.cloudmade.com//{z}/{x}/{y}.png")

var rain = new L.tileLayer.wms("http://localhost:8080/geoserver/test/wms", {
    layers: 'wrc:data',
        format: 'image/png',
            transparent: true
        });

var texture = new L.tileLayer.wms("http://localhost:8080/geoserver/test/wms", {
    layers: 'wrc:TEXTURED_LANDCOVER_20M',
        format: 'image/jpg',
            transparent: true
        });

var map = new L.Map("map", {
    center: [-37.9021, 175.1725],
    zoom: 8,
  })
  .addLayer(layer);

var baseMaps = {
    "cloudmade": cloudmade,
    "watercolor": watercolor,
};

var overlayMaps = {
    "test": texture,
    "rain": rain,
};

L.control.layers(baseMaps, overlayMaps).addTo(map);
@birdage
Copy link
Contributor

birdage commented May 12, 2014

👍 interested

@birdage
Copy link
Contributor

birdage commented Aug 18, 2014

@ocefpaf
Copy link
Member

ocefpaf commented Dec 2, 2014

Hi @bevanj,

@birdage already implemented this. Here is an updated version of the example notebook:

http://nbviewer.ipython.org/gist/ocefpaf/a87157225f82986dfb5b

Let us know if that works for you.

@ocefpaf ocefpaf closed this as completed Dec 2, 2014
Conengmo pushed a commit to Conengmo/folium that referenced this issue Jul 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants