Skip to content

Commit

Permalink
read in restrictedExtent (#1203)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgao1 authored Nov 29, 2023
1 parent 13140f7 commit 0cc0626
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions nunaliit2-js/src/main/js/nunaliit2/n2.couchModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,14 +1381,15 @@ var ModuleDisplay = $n2.Class({

// Map max extent
var mapInfo = _this.module.getMapInfo();
if( mapInfo
if (mapInfo
&& mapInfo.coordinates
&& mapInfo.coordinates.maxExtent ){
mapOptions.mapCoordinateSpecifications.maxExtent =
mapInfo.coordinates.maxExtent;

} else if( mapOptions.mapDisplay.srsName !== null
&& mapOptions.mapDisplay.srsName !== 'EPSG:4326' ) {
&& mapInfo.coordinates.maxExtent) {
mapOptions.mapCoordinateSpecifications.maxExtent = mapInfo.coordinates.maxExtent;
if (mapInfo.coordinates.restrictedExtent) {
mapOptions.mapCoordinateSpecifications.restrictedExtent = mapInfo.coordinates.restrictedExtent;
}
} else if (mapOptions.mapDisplay.srsName !== null
&& mapOptions.mapDisplay.srsName !== 'EPSG:4326') {
mapOptions.mapCoordinateSpecifications.maxExtent =
mapOptions.mapCoordinateSpecifications.initialBounds;
};
Expand Down

0 comments on commit 0cc0626

Please sign in to comment.