Mercurial > gemma
changeset 3256:48801e13ef18
client: identify: made identification of image layers work with current map resolution
instead of a fixed value of 100 which lead to unexpected results
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 14 May 2019 18:51:16 +0200 |
parents | ccd1f03ed18a |
children | 97bd458acf0e |
files | client/src/store/map.js |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/store/map.js Tue May 14 17:43:54 2019 +0200 +++ b/client/src/store/map.js Tue May 14 18:51:16 2019 +0200 @@ -395,10 +395,12 @@ } */ + let currentResolution = map.getView().getResolution(); + var waterwayAxisSource = map.getLayer("WATERWAYAXIS").getSource(); var waxisUrl = waterwayAxisSource.getGetFeatureInfoUrl( event.coordinate, - 100 /* resolution */, + currentResolution /* resolution */, "EPSG:3857", // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d { INFO_FORMAT: "application/json" } @@ -425,7 +427,7 @@ var waterwayAreaSource = map.getLayer("WATERWAYAREA").getSource(); var wareaUrl = waterwayAreaSource.getGetFeatureInfoUrl( event.coordinate, - 100 /* resolution */, + currentResolution /* resolution */, "EPSG:3857", // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d { INFO_FORMAT: "application/json" } @@ -451,7 +453,7 @@ var dmSource = map.getLayer("DISTANCEMARKS").getSource(); var dmUrl = dmSource.getGetFeatureInfoUrl( event.coordinate, - 100 /* resolution */, + currentResolution /* resolution */, "EPSG:3857", // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d { INFO_FORMAT: "application/json" } @@ -477,7 +479,7 @@ var dmaSource = map.getLayer("DISTANCEMARKSAXIS").getSource(); var dmaUrl = dmaSource.getGetFeatureInfoUrl( event.coordinate, - 100 /* resolution */, + currentResolution /* resolution */, "EPSG:3857", // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d { INFO_FORMAT: "application/json" } @@ -504,7 +506,7 @@ var iecdisSource = map.getLayer("INLANDECDIS").getSource(); var iecdisUrl = iecdisSource.getGetFeatureInfoUrl( event.coordinate, - 100 /* resolution */, + currentResolution /* resolution */, "EPSG:3857", // { INFO_FORMAT: "application/vnd.ogc.gml" } // not allowed by d4d { INFO_FORMAT: "text/plain" }