I am trying to add a variable inside the path to map layer.
mypath='MyApp'
var Finals = L.tileLayer.wms("http://localhost:8080/geoserver/'+mypath+'/wms", {
layers: 'MyApp:finalVector',
format: 'image/png',
transparent: true,
version: '1.1.0',
attribution: "myattribution"
});
How can I add mypath variable inside the Finals variable.
After adding it should act like following
var Finals = L.tileLayer.wms("http://localhost:8080/geoserver/MyApp/wms", {
layers: 'MyApp:finalVector',
format: 'image/png',
transparent: true,
version: '1.1.0',
attribution: "myattribution"
});