@lbdudc/gp-gis-dsl 0.2.5 → 0.2.6
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.
- package/package.json +1 -1
- package/src/GISVisitor.js +11 -8
- package/src/features.js +53 -53
- package/src/spl/WMSLayer.js +1 -1
package/package.json
CHANGED
package/src/GISVisitor.js
CHANGED
|
@@ -276,18 +276,21 @@ class Visitor extends GISGrammarVisitor {
|
|
|
276
276
|
aux = ctx.getChild(i);
|
|
277
277
|
auxEntityName = aux.getChild(0).getText();
|
|
278
278
|
entity = this.store.getCurrentProduct().getEntity(auxEntityName);
|
|
279
|
-
|
|
280
|
-
if (!entity) {
|
|
281
|
-
throw `ERROR: entity ${auxEntityName} required by layer ${id} does not exists!!`;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
279
|
styleName = aux.getChild(1).getText();
|
|
285
280
|
style = this.store.getCurrentProduct().getStyle(styleName);
|
|
286
|
-
|
|
287
|
-
|
|
281
|
+
|
|
282
|
+
if (entity) {
|
|
283
|
+
layer.addSubLayer(entity.name, styleName);
|
|
284
|
+
} else {
|
|
285
|
+
// GeoTIFF case: no associated entity exists
|
|
286
|
+
const normalizedId = id
|
|
287
|
+
.replace(/Layer$/, "")
|
|
288
|
+
.replace(/^(\d+)([A-Z][a-z]+)/, "$1_$2")
|
|
289
|
+
.toLowerCase();
|
|
290
|
+
layer.addSubLayer(normalizedId, null);
|
|
288
291
|
}
|
|
289
|
-
layer.addSubLayer(entity.name, styleName);
|
|
290
292
|
}
|
|
293
|
+
|
|
291
294
|
this.log(`visitCreateWmsLayer ${id} - ${label}`);
|
|
292
295
|
|
|
293
296
|
this.store.getCurrentProduct().addLayer(layer);
|
package/src/features.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
export default [
|
|
2
|
-
"MapViewer",
|
|
3
|
-
"Tools",
|
|
4
|
-
"DM_SpatialDatabase",
|
|
5
|
-
"DM_GenerationType",
|
|
6
|
-
"MV_MapServer",
|
|
7
|
-
"MV_Tools",
|
|
8
|
-
"MV_MapManagement",
|
|
9
|
-
"DM_SD_PostGIS",
|
|
10
|
-
"DM_GT_Sequence",
|
|
11
|
-
"MV_MM_MultipleMapViewer",
|
|
12
|
-
"MV_MM_MMV_MapSelectorInMapViewer",
|
|
13
|
-
"MV_MM_MMV_MapSelectorInMenuElement",
|
|
14
|
-
"MV_MS_GeoServer",
|
|
15
|
-
"GUI_Lists",
|
|
16
|
-
"GUI_L_FormLink",
|
|
17
|
-
"GUI_L_F_BasicSearch",
|
|
18
|
-
"GUI_L_Filterable",
|
|
19
|
-
"GUI_L_Sortable",
|
|
20
|
-
"GUI_L_LocateInMap",
|
|
21
|
-
"GUI_L_ViewListAsMap",
|
|
22
|
-
"MV_ContextInformation",
|
|
23
|
-
"MV_CI_Scale",
|
|
24
|
-
"MV_CI_Map",
|
|
25
|
-
"MV_CI_CenterCoordinates",
|
|
26
|
-
"MV_CI_Dimensions",
|
|
27
|
-
"MV_DetailOnClick",
|
|
28
|
-
"MV_LayerManagement",
|
|
29
|
-
"MV_LM_CenterViewOnLayer",
|
|
30
|
-
"MV_LM_Order",
|
|
31
|
-
"MV_LM_Opacity",
|
|
32
|
-
"MV_LM_HideLayer",
|
|
33
|
-
"MV_LM_Style",
|
|
34
|
-
"MV_LM_ExternalLayer",
|
|
35
|
-
"MV_LM_StylePreview",
|
|
36
|
-
"MV_T_E_Type",
|
|
37
|
-
"MV_T_E_F_URL",
|
|
38
|
-
"MV_T_E_F_PDF",
|
|
39
|
-
"MV_T_E_SetScale",
|
|
40
|
-
"MV_T_E_ShowLegend",
|
|
41
|
-
"MV_T_InformationMode",
|
|
42
|
-
"MV_T_MeasureControl",
|
|
43
|
-
"MV_T_ZoomWindow",
|
|
44
|
-
"MV_T_ViewMapAsList",
|
|
45
|
-
"DM_DataInput",
|
|
46
|
-
"DM_DI_DataFeeding",
|
|
47
|
-
"DM_DI_DF_Shapefile",
|
|
48
|
-
"T_GIS",
|
|
49
|
-
"T_EntitiesInformation",
|
|
50
|
-
"D_C_Postgres",
|
|
51
|
-
"D_C_Geoserver",
|
|
52
|
-
"D_C_Nginx",
|
|
53
|
-
];
|
|
1
|
+
export default [
|
|
2
|
+
"MapViewer",
|
|
3
|
+
"Tools",
|
|
4
|
+
"DM_SpatialDatabase",
|
|
5
|
+
"DM_GenerationType",
|
|
6
|
+
"MV_MapServer",
|
|
7
|
+
"MV_Tools",
|
|
8
|
+
"MV_MapManagement",
|
|
9
|
+
"DM_SD_PostGIS",
|
|
10
|
+
"DM_GT_Sequence",
|
|
11
|
+
"MV_MM_MultipleMapViewer",
|
|
12
|
+
"MV_MM_MMV_MapSelectorInMapViewer",
|
|
13
|
+
"MV_MM_MMV_MapSelectorInMenuElement",
|
|
14
|
+
"MV_MS_GeoServer",
|
|
15
|
+
"GUI_Lists",
|
|
16
|
+
"GUI_L_FormLink",
|
|
17
|
+
"GUI_L_F_BasicSearch",
|
|
18
|
+
"GUI_L_Filterable",
|
|
19
|
+
"GUI_L_Sortable",
|
|
20
|
+
"GUI_L_LocateInMap",
|
|
21
|
+
"GUI_L_ViewListAsMap",
|
|
22
|
+
"MV_ContextInformation",
|
|
23
|
+
"MV_CI_Scale",
|
|
24
|
+
"MV_CI_Map",
|
|
25
|
+
"MV_CI_CenterCoordinates",
|
|
26
|
+
"MV_CI_Dimensions",
|
|
27
|
+
"MV_DetailOnClick",
|
|
28
|
+
"MV_LayerManagement",
|
|
29
|
+
"MV_LM_CenterViewOnLayer",
|
|
30
|
+
"MV_LM_Order",
|
|
31
|
+
"MV_LM_Opacity",
|
|
32
|
+
"MV_LM_HideLayer",
|
|
33
|
+
"MV_LM_Style",
|
|
34
|
+
"MV_LM_ExternalLayer",
|
|
35
|
+
"MV_LM_StylePreview",
|
|
36
|
+
"MV_T_E_Type",
|
|
37
|
+
"MV_T_E_F_URL",
|
|
38
|
+
"MV_T_E_F_PDF",
|
|
39
|
+
"MV_T_E_SetScale",
|
|
40
|
+
"MV_T_E_ShowLegend",
|
|
41
|
+
"MV_T_InformationMode",
|
|
42
|
+
"MV_T_MeasureControl",
|
|
43
|
+
"MV_T_ZoomWindow",
|
|
44
|
+
"MV_T_ViewMapAsList",
|
|
45
|
+
"DM_DataInput",
|
|
46
|
+
"DM_DI_DataFeeding",
|
|
47
|
+
"DM_DI_DF_Shapefile",
|
|
48
|
+
"T_GIS",
|
|
49
|
+
"T_EntitiesInformation",
|
|
50
|
+
"D_C_Postgres",
|
|
51
|
+
"D_C_Geoserver",
|
|
52
|
+
"D_C_Nginx",
|
|
53
|
+
];
|
package/src/spl/WMSLayer.js
CHANGED
|
@@ -16,8 +16,8 @@ export default class WMSLayer {
|
|
|
16
16
|
addSubLayer(entityId, style) {
|
|
17
17
|
this.list = entityId;
|
|
18
18
|
this.layers.push(entityId);
|
|
19
|
+
if (style) this.availableStyles.push(style);
|
|
19
20
|
this.defaultStyles = style;
|
|
20
|
-
this.availableStyles.push(style);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
toString() {
|