Created
October 31, 2019 08:19
-
-
Save iamtekson/9b484ca98468d494822f6e485f8da46d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//var region defined | |
var region = $('#inputGroupSelect01').val() | |
region = $('#inputGroupSelect01').change(function() { | |
$(this).val() | |
}); | |
//button click events | |
$('#load').click(function () { | |
//hazardLayer | |
var hazardLayer = L.tileLayer.wms("http://localhost:8080/geoserver/tajikistan/wms", { | |
layers: `tajikistan:${region}`, | |
format: 'image/png', | |
transparent: true, | |
version: '1.1.0', | |
attribution: "country layer" | |
}); | |
hazardLayer.addTo(map); | |
$('#clear').click(function () { | |
map.removeLayer(hazardLayer); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment