@geospatial-sdk/legend 0.0.5-dev.31 → 0.0.5-dev.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,6 +24,7 @@ function createWmsLegendUrl(layer, options = {}) {
|
|
|
24
24
|
"FORMAT",
|
|
25
25
|
"LAYER",
|
|
26
26
|
"LAYERTITLE",
|
|
27
|
+
"SLD_VERSION",
|
|
27
28
|
"WIDTH",
|
|
28
29
|
"HEIGHT",
|
|
29
30
|
]));
|
|
@@ -32,6 +33,7 @@ function createWmsLegendUrl(layer, options = {}) {
|
|
|
32
33
|
legendUrl.searchParams.set("FORMAT", format);
|
|
33
34
|
legendUrl.searchParams.set("LAYER", layer.name);
|
|
34
35
|
legendUrl.searchParams.set("LAYERTITLE", false.toString()); // Disable layer title for QGIS Server
|
|
36
|
+
legendUrl.searchParams.set("SLD_VERSION", "1.1.0"); // Default SLD version
|
|
35
37
|
if (widthPxHint) {
|
|
36
38
|
legendUrl.searchParams.set("WIDTH", widthPxHint.toString());
|
|
37
39
|
}
|
|
@@ -50,8 +52,6 @@ function createWmtsLegendUrl(layer) {
|
|
|
50
52
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
53
|
const endpoint = yield new WmtsEndpoint(layer.url).isReady();
|
|
52
54
|
const layerByName = endpoint.getLayerByName(layer.name);
|
|
53
|
-
console.log("layerByName");
|
|
54
|
-
console.log(layerByName);
|
|
55
55
|
if (layerByName.styles &&
|
|
56
56
|
layerByName.styles.length > 0 &&
|
|
57
57
|
layerByName.styles[0].legendUrl) {
|
|
@@ -35,6 +35,7 @@ function createWmsLegendUrl(
|
|
|
35
35
|
"FORMAT",
|
|
36
36
|
"LAYER",
|
|
37
37
|
"LAYERTITLE",
|
|
38
|
+
"SLD_VERSION",
|
|
38
39
|
"WIDTH",
|
|
39
40
|
"HEIGHT",
|
|
40
41
|
]),
|
|
@@ -44,6 +45,7 @@ function createWmsLegendUrl(
|
|
|
44
45
|
legendUrl.searchParams.set("FORMAT", format);
|
|
45
46
|
legendUrl.searchParams.set("LAYER", layer.name);
|
|
46
47
|
legendUrl.searchParams.set("LAYERTITLE", false.toString()); // Disable layer title for QGIS Server
|
|
48
|
+
legendUrl.searchParams.set("SLD_VERSION", "1.1.0"); // Default SLD version
|
|
47
49
|
|
|
48
50
|
if (widthPxHint) {
|
|
49
51
|
legendUrl.searchParams.set("WIDTH", widthPxHint.toString());
|
|
@@ -67,8 +69,6 @@ async function createWmtsLegendUrl(
|
|
|
67
69
|
const endpoint = await new WmtsEndpoint(layer.url).isReady();
|
|
68
70
|
|
|
69
71
|
const layerByName = endpoint.getLayerByName(layer.name);
|
|
70
|
-
console.log("layerByName");
|
|
71
|
-
console.log(layerByName);
|
|
72
72
|
|
|
73
73
|
if (
|
|
74
74
|
layerByName.styles &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geospatial-sdk/legend",
|
|
3
|
-
"version": "0.0.5-dev.
|
|
3
|
+
"version": "0.0.5-dev.33+c11d24f",
|
|
4
4
|
"description": "Get legend graphic from the map-context",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend"
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"build": "tsc"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@geospatial-sdk/core": "^0.0.5-dev.
|
|
33
|
+
"@geospatial-sdk/core": "^0.0.5-dev.33+c11d24f"
|
|
34
34
|
},
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/camptocamp/geospatial-sdk/issues"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "c11d24f812fefab2aa4dec7d95b28e89ec90b581"
|
|
39
39
|
}
|