Use better check for equivalent transforms
This commit is contained in:
@@ -264,10 +264,12 @@ ol.view.Attribution.prototype.getAttributionVisiblity_ =
|
|||||||
if (attributionKey in this.coverageAreass_) {
|
if (attributionKey in this.coverageAreass_) {
|
||||||
coverageAreas = this.coverageAreass_[attributionKey];
|
coverageAreas = this.coverageAreass_[attributionKey];
|
||||||
} else {
|
} else {
|
||||||
|
var attributionProjection = attribution.getProjection();
|
||||||
coverageAreas = attribution.getCoverageAreas();
|
coverageAreas = attribution.getCoverageAreas();
|
||||||
if (!goog.isNull(coverageAreas)) {
|
if (!goog.isNull(coverageAreas) &&
|
||||||
|
!ol.Projection.equivalent(attributionProjection, mapProjection)) {
|
||||||
var transformFn = ol.Projection.getTransform(
|
var transformFn = ol.Projection.getTransform(
|
||||||
attribution.getProjection(), mapProjection);
|
attributionProjection, mapProjection);
|
||||||
if (transformFn !== ol.Projection.cloneTransform) {
|
if (transformFn !== ol.Projection.cloneTransform) {
|
||||||
coverageAreas = goog.array.map(coverageAreas, function(coverageArea) {
|
coverageAreas = goog.array.map(coverageAreas, function(coverageArea) {
|
||||||
return coverageArea.transform(transformFn);
|
return coverageArea.transform(transformFn);
|
||||||
|
|||||||
Reference in New Issue
Block a user