Skip to content

Commit

Permalink
aligned with fixed reprojection table feature
Browse files Browse the repository at this point in the history
  • Loading branch information
volterra79 committed Oct 13, 2020
1 parent 8e28f84 commit fbe6949
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/app/gui/table/tableservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ proto._setLayout = function() {

proto._returnGeometry = function(feature) {
let geometry;
if (feature.attributes) {
geometry = feature.geometry;
} else if (feature.geometry) {
geometry = coordinatesToGeometry(feature.geometry.type, feature.geometry.coordinates);
}
const mapService = GUI.getComponent('map').getService();
const layerCode = this.layer.getProjection().getCode();
const mapCode = mapService.getProjection().getCode();
if (feature.attributes) geometry = feature.geometry;
else if (feature.geometry) geometry = coordinatesToGeometry(feature.geometry.type, feature.geometry.coordinates);
(geometry && layerCode !== mapCode) && geometry.transform(layerCode, mapCode);
return geometry;
};

Expand Down

0 comments on commit fbe6949

Please sign in to comment.