Database Reference
In-Depth Information
opacity: 0.7
});
• For Windows, use the following code:
// mapserver layer
var ms_url =
"http://localhost/cgi-bin/
mapserv.exe?map=C:%5Cms4w%5CApache%5Chtdocs%5Ccountries.map&";
var countries =
L.tileLayer.wms(ms_url, {
layers: 'countries',
format: 'image/png',
transparent: true,
opacity: 0.7
});
5. Create the Leaflet map andadd layers to it, as shown in the following code:
// map creation
var map = new L.Map('map', {
center: new L.LatLng(15, 0),
zoom: 2,
layers: [osm, countries],
zoomControl: true
});
6. Now, associate the mouse-click event with a function that will perform the
GetFeatureInfo WMSrequestonthe countries layer,byexecutingthe
following code:
// getfeatureinfo event
map.addEventListener('click', Identify);
function Identify(e) {
// set parameters needed for
GetFeatureInfo WMS request
var BBOX =
Search WWH ::




Custom Search