# HG changeset patch # User Markus Kottlaender # Date 1557852676 -7200 # Node ID 48801e13ef183b01ec6805741cf1a895c533adac # Parent ccd1f03ed18afd1829783d48fc3beb21dcda638a client: identify: made identification of image layers work with current map resolution instead of a fixed value of 100 which lead to unexpected results diff -r ccd1f03ed18a -r 48801e13ef18 client/src/store/map.js --- 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" }