mirror of
https://github.com/NASAWorldWind/WebWorldWind.git
synced 2026-02-01 16:38:15 +00:00
Add utility method to provide Sector object from WGS84BoundingBox element
This commit is contained in:
parent
2c18114b5c
commit
5082d06413
@ -127,11 +127,7 @@ define([
|
||||
"No bounding box was specified in the layer or tile matrix set capabilities."));
|
||||
}
|
||||
} else if (config.wgs84BoundingBox) {
|
||||
this.sector = new Sector(
|
||||
config.wgs84BoundingBox.lowerCorner[1],
|
||||
config.wgs84BoundingBox.upperCorner[1],
|
||||
config.wgs84BoundingBox.lowerCorner[0],
|
||||
config.wgs84BoundingBox.upperCorner[0]);
|
||||
this.sector = config.wgs84BoundingBox.getSector();
|
||||
} else if (this.tileMatrixSet.boundingBox &&
|
||||
WmtsLayer.isEpsg4326Crs(this.tileMatrixSet.boundingBox.crs)) {
|
||||
this.sector = new Sector(
|
||||
|
||||
@ -7,12 +7,14 @@
|
||||
*/
|
||||
define([
|
||||
'../error/ArgumentError',
|
||||
'../util/Logger',
|
||||
'../ogc/OwsDescription'
|
||||
'../geom/Sector',
|
||||
'../ogc/OwsDescription',
|
||||
'../util/Logger'
|
||||
],
|
||||
function (ArgumentError,
|
||||
Logger,
|
||||
OwsDescription) {
|
||||
Sector,
|
||||
OwsDescription,
|
||||
Logger) {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
@ -244,6 +246,13 @@ define([
|
||||
}
|
||||
}
|
||||
|
||||
// Add a utility which provides a Sector based on the WGS84BoundingBox element
|
||||
if (element.localName === "WGS84BoundingBox") {
|
||||
result.getSector = function () {
|
||||
return new Sector(result.lowerCorner[1], result.upperCorner[1], result.lowerCorner[0], result.upperCorner[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user