Hi.
Ol-layerswitcher is a really great job. I'm new to javascript and openlayers and I'm trying to do my first web map application. During the time I faced the problem with static legend display in sidebar. I don't know how to display it beside checkbox and layer name. GetLegendGraphic query works perfectly but I don't know where to put it in my code :( Sample of code:
new ol.layer.Group({
// A layer must have a title to appear in the layerswitcher
title: "ZDW",
fold: "open",
layers: [
new ol.layer.Image({
// A layer must have a title to appear in the layerswitcher
title: "dze",
visible: true,
zIndex: 0,
source: new ol.source.ImageWMS({
ratio: 1,
params: { LAYERS: "dw", VERSION: "1.3.0" },
url: "http://my_ip_adress/geoserver/wms",
tiled: "true",
projection: "EPSG:2177",
crossOrigin: "anonymous",
serverType: "geoserver",
}),
}),
Can You tell me please what should I do?
Hi.
Ol-layerswitcher is a really great job. I'm new to javascript and openlayers and I'm trying to do my first web map application. During the time I faced the problem with static legend display in sidebar. I don't know how to display it beside checkbox and layer name. GetLegendGraphic query works perfectly but I don't know where to put it in my code :( Sample of code:
new ol.layer.Group({
// A layer must have a title to appear in the layerswitcher
title: "ZDW",
fold: "open",
layers: [
new ol.layer.Image({
// A layer must have a title to appear in the layerswitcher
title: "dze",
visible: true,
zIndex: 0,
source: new ol.source.ImageWMS({
ratio: 1,
params: { LAYERS: "dw", VERSION: "1.3.0" },
url: "http://my_ip_adress/geoserver/wms",
tiled: "true",
projection: "EPSG:2177",
crossOrigin: "anonymous",
serverType: "geoserver",
}),
}),
Can You tell me please what should I do?