| @@ 24-59 (lines=36) @@ | ||
| 21 | }; |
|
| 22 | ||
| 23 | ||
| 24 | NPA.getLayer = function () { |
|
| 25 | 'use strict'; |
|
| 26 | ||
| 27 | if (!this.m_layer) { |
|
| 28 | var tileSize = 256, |
|
| 29 | themap = this.m_map; |
|
| 30 | this.m_layer = new google.maps.ImageMapType({ |
|
| 31 | getTileUrl: function (coord, zoom) { |
|
| 32 | var proj = themap.getProjection(), |
|
| 33 | zfactor = tileSize / Math.pow(2, zoom), |
|
| 34 | top = proj.fromPointToLatLng(new google.maps.Point(coord.x * zfactor, coord.y * zfactor)), |
|
| 35 | bot = proj.fromPointToLatLng(new google.maps.Point((coord.x + 1) * zfactor, (coord.y + 1) * zfactor)), |
|
| 36 | bbox = top.lng() + "," + bot.lat() + "," + bot.lng() + "," + top.lat(), |
|
| 37 | url; |
|
| 38 | url = "https://geodienste.bfn.de/ogc/wms/schutzgebiet?" + |
|
| 39 | "&REQUEST=GetMap" + |
|
| 40 | "&SERVICE=WMS" + |
|
| 41 | "&VERSION=1.3.0" + |
|
| 42 | "&LAYERS=Naturschutzgebiete" + |
|
| 43 | "&FORMAT=image/png" + |
|
| 44 | "&BGCOLOR=0xFFFFFF" + |
|
| 45 | "&STYLES=default" + |
|
| 46 | "&TRANSPARENT=TRUE" + |
|
| 47 | "&CRS=CRS:84" + |
|
| 48 | "&BBOX=" + bbox + |
|
| 49 | "&WIDTH=" + tileSize + |
|
| 50 | "&HEIGHT=" + tileSize; |
|
| 51 | return url; |
|
| 52 | }, |
|
| 53 | tileSize: new google.maps.Size(tileSize, tileSize), |
|
| 54 | isPng: true, |
|
| 55 | opacity: 0.6 |
|
| 56 | }); |
|
| 57 | } |
|
| 58 | return this.m_layer; |
|
| 59 | }; |
|
| 60 | ||
| 61 | ||
| 62 | NPA.getPopupContentFromResponse = function (json) { |
|
| @@ 24-55 (lines=32) @@ | ||
| 21 | }; |
|
| 22 | ||
| 23 | ||
| 24 | CDDA.getLayer = function () { |
|
| 25 | 'use strict'; |
|
| 26 | ||
| 27 | if (!this.m_layer) { |
|
| 28 | var tileSize = 256, |
|
| 29 | themap = this.m_map; |
|
| 30 | this.m_layer = new google.maps.ImageMapType({ |
|
| 31 | getTileUrl: function (coord, zoom) { |
|
| 32 | var proj = themap.getProjection(), |
|
| 33 | zfactor = tileSize / Math.pow(2, zoom), |
|
| 34 | top = proj.fromPointToLatLng(new google.maps.Point(coord.x * zfactor, coord.y * zfactor)), |
|
| 35 | bot = proj.fromPointToLatLng(new google.maps.Point((coord.x + 1) * zfactor, (coord.y + 1) * zfactor)), |
|
| 36 | bbox = top.lng() + "," + bot.lat() + "," + bot.lng() + "," + top.lat(), |
|
| 37 | url; |
|
| 38 | url = "https://bio.discomap.eea.europa.eu/arcgis/rest/services/ProtectedSites/CDDA_Dyna_WM/MapServer/export?" + |
|
| 39 | "dpi=96" + |
|
| 40 | "&transparent=true" + |
|
| 41 | "&format=png32" + |
|
| 42 | "&layers=show%3A0%2C1%2C2%2C3%2C4" + |
|
| 43 | "&BBOX=" + bbox + |
|
| 44 | "&bboxSR=4326" + |
|
| 45 | "&size=" + tileSize + "%2C" + tileSize + |
|
| 46 | "&f=image"; |
|
| 47 | return url; |
|
| 48 | }, |
|
| 49 | tileSize: new google.maps.Size(tileSize, tileSize), |
|
| 50 | isPng: true, |
|
| 51 | opacity: 0.6 |
|
| 52 | }); |
|
| 53 | } |
|
| 54 | return this.m_layer; |
|
| 55 | }; |
|
| 56 | ||
| 57 | ||
| 58 | CDDA.getPopupContentFromResponse = function (json) { |
|