فهرست منبع

⚡️ add LPIS also as WMS

jmacura 3 سال پیش
والد
کامیت
a845b92e13
3فایلهای تغییر یافته به همراه22 افزوده شده و 5 حذف شده
  1. 18 1
      src/app/app.service.ts
  2. 1 1
      src/app/calculator/field.service.ts
  3. 3 3
      src/app/translations.json

+ 18 - 1
src/app/app.service.ts

@@ -181,7 +181,7 @@ export class AppService {
         /* Thematic layers */
         new VectorLayer({
           properties: {
-            title: 'LPIS',
+            title: 'LPIS (WFS)',
             synchronize: false,
             cluster: false,
             inlineLegend: true,
@@ -201,9 +201,26 @@ export class AppService {
             },
             //path: 'User generated',
           },
+          minZoom: 15,
           opacity: 0.7,
           source: lpisSource,
         }),
+        new Tile({
+          properties: {
+            title: 'LPIS (WMS)',
+            queryCapabilities: false,
+          },
+          maxZoom: 15,
+          source: new TileWMS({
+            url: 'https://gis.lesprojekt.cz/cgi-bin/mapserv?map=/home/dima/maps/foodie/lpis.map',
+            params: {
+              LAYERS: 'lpis_borders', //'lpis_cultures'
+              INFO_FORMAT: undefined,
+              FORMAT: 'image/png; mode=8bit',
+            },
+            crossOrigin: 'anonymous',
+          }),
+        }),
       ],
       translationOverrides: i18n,
     });

+ 1 - 1
src/app/calculator/field.service.ts

@@ -10,7 +10,7 @@ import {HsEventBusService, HsMapService} from 'hslayers-ng';
 
 @Injectable({providedIn: 'root'})
 export class FieldService {
-  SELECTABLE_LAYERS = ['LPIS'] as const;
+  SELECTABLE_LAYERS = ['LPIS (WFS)'] as const;
   fieldSelects: Subject<{feature: Feature<Geometry>}> = new Subject();
   selectedField;
 

+ 3 - 3
src/app/translations.json

@@ -5,7 +5,7 @@
       "getZones": "ZÍSKAT ZÓNY",
       "panelHeader": "Výpočet indexů pole",
       "selectDate": "Chci datum",
-      "selectField": "Pole vyberte kliknutím do mapy",
+      "selectField": "Pole vyberte kliknutím do mapy. Pro výběr pole je potřeba mapu přiblížit.",
       "selectedField": "Vybráno pole",
       "selectIndex": "Chci vypočítat index"
     }
@@ -16,8 +16,8 @@
       "getZones": "GET ZONES",
       "panelHeader": "Field calculation",
       "selectDate": "I want a datum",
-      "selectField": "Select a field by clicking in the map",
-      "SelectedField": "Selected field",
+      "selectField": "Select a field by clicking in the map. In order to select the field, you must zoom the map in.",
+      "selectedField": "Selected field",
       "selectIndex": "I want to calculate index"
     }
   }