Skip to content

WMS GetFeatureInfo incorrect point position #9363

@zoran995

Description

@zoran995

Sandcastle example

Browser: All

Operating System: All

Reported also: TerriaJS/terriajs#5057

When using WMS in a WebMercatorProjection instead of GeographicProjection user will get the wrong feature position in response. The issue seems to be coming from

if (defined(feature.geometry) && feature.geometry.type === "Point") {
var longitude = feature.geometry.coordinates[0];
var latitude = feature.geometry.coordinates[1];
featureInfo.position = Cartographic.fromDegrees(longitude, latitude);
}

which incorrectly assumes that point coordinate is in GeographicProjection. Also, the issue that might affect more users is the selection indicator that is wrongly positioned. In some rare cases, it might even fly around as user rotate the globe (see photo below).
Any tips on approach solving this, thinking about passing a tilingScheme or MapProjection instance to GetFeatureInfo.

image
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions