heigeo / leaflet.wms

A Leaflet plugin for working with Web Map services, providing: single-tile/untiled/nontiled layers, shared WMS sources, and GetFeatureInfo-powered identify.
http://heigeo.github.io/leaflet.wms/
MIT License
242 stars 135 forks source link

Overwrite #43

Closed t-book closed 6 years ago

t-book commented 7 years ago

Hi, can one show me how to correctly limit the amount of layers that are identified. I´ve tried an extend like this which unfortunately is not working.

var MySource = L.WMS.Source.extend({
 'getIdentifyLayers': function() {
      var a = ['geonode:tl_2016_us_tbg']
      console.log(a);
      return a;
    }
    }
});

var source = new MySource("http://node.local/geoserver/wms", {
    'transparent': true
});
sheppard commented 7 years ago

Yes, extend is the recommended approach. Can you provide more detail as to what isn't working?