2

I am using Leaflet (leaflet-0.7.3) to publish a WMS layergroup from GeoServer.

My code is:

var basemap2 = L.tileLayer.wms('http://localhost:8080/geoserver/ows?version=1.3.0&', {
            layers: 'Tinos_2017:Basemap_Tinos',
            format: 'image/png',
            uppercase: true,
            transparent: true,
            continuousWorld : true,
            opacity: 1.0,
          tileSize: 3000
        });
basemap2.addTo(map); 

But the map is really slow. I tried including this plugin L.singleTile.js and change my code:

var basemap2 = L.singleTile('http://localhost:8080/geoserver/ows?version=1.3.0&'', { layers: 'Tinos_2017:Basemap_Tinos',
                    format: 'image/png',
                    transparent: true,
                    opacity: 1.0,
                });
basemap2.addTo(map); 

But the basemap doesn't appear after that.

Is something wrong with my code or the way I am using the plugin?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.