jmacura 3 lat temu
rodzic
commit
62b0b66270
3 zmienionych plików z 11 dodań i 8 usunięć
  1. 2 2
      package-lock.json
  2. 1 1
      package.json
  3. 8 5
      src/app/app.service.ts

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
   "name": "fieldcalc-frontend",
-  "version": "0.2.0",
+  "version": "0.2.1",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "fieldcalc-frontend",
-      "version": "0.2.0",
+      "version": "0.2.1",
       "license": "MIT",
       "dependencies": {
         "hslayers-ng": "^7.0.3"

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "fieldcalc-frontend",
-  "version": "0.2.0",
+  "version": "0.2.1",
   "description": "HSLayers-NG application",
   "main": "build/index.html",
   "directories": {

+ 8 - 5
src/app/app.service.ts

@@ -80,9 +80,12 @@ export class AppService {
       }),
       url: (extent) => {
         const kulturaKod = 1; // Doesn't seem to work
-        // eslint-disable-next-line prettier/prettier
-        let proxyPath = window.location.hostname.includes('localhost') ? 'http://localhost:8085/' : '/proxy/';
-        return proxyPath + 'https://gis.lesprojekt.cz/cgi-bin/mapserv?map=/home/dima/maps/foodie/lpis.map' +
+        const proxyPath = window.location.hostname.includes('localhost')
+          ? 'http://localhost:8085/'
+          : '/proxy/';
+        return (
+          proxyPath +
+          'https://gis.lesprojekt.cz/cgi-bin/mapserv?map=/home/dima/maps/foodie/lpis.map' +
           '&service=WFS' +
           '&VERSION=1.1.0' +
           '&REQUEST=GetFeature' +
@@ -91,8 +94,8 @@ export class AppService {
           '&outputformat=geojson' +
           '&SRSNAME=EPSG:5514' +
           `&BBOX=${extent.join(',')}` +
-          // eslint-disable-next-line prettier/prettier
-          `&<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>kulturakod</ogc:PropertyName><ogc:Literal>${kulturaKod}</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>`;
+          `&<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsEqualTo><ogc:PropertyName>kulturakod</ogc:PropertyName><ogc:Literal>${kulturaKod}</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>`
+        );
         //%3Cgml:Box%3E%3Cgml:coordinates%3E${
         //extent.join(',')
         //}%3C/gml:coordinates%3E%3C/gml:Box%3E%3C/ogc:Filter%3E`;