Revision 95aba8b5
Added by Andreas Kohlbecker over 4 years ago
modules/cdm_dataportal/js/map/openlayers_map.js | ||
---|---|---|
577 | 577 |
*/ |
578 | 578 |
var createDataLayer = function(mapResponseObj, dataType){ |
579 | 579 |
|
580 |
console.log("creating data layer of type " + dataType); |
|
580 |
console.log("createDataLayer() : creating data layer of type " + dataType);
|
|
581 | 581 |
|
582 | 582 |
dataLayerOptions = makeWMSLayerOptions(); |
583 | 583 |
dataLayerOptions.displayOutsideMaxExtent = true; // move into makeWMSLayerOptions? |
... | ... | |
620 | 620 |
layers.push(pointLayer); |
621 | 621 |
} else { |
622 | 622 |
// it is a response from for a distribution map |
623 |
console.log("start with adding distribution layers :"); |
|
623 |
console.log("createDataLayer() : start with adding distribution layers :");
|
|
624 | 624 |
for ( var i in mapResponseObj.layers) { |
625 | 625 |
var layerData = mapResponseObj.layers[i]; |
626 | 626 |
|
... | ... | |
647 | 647 |
if(mapResponseObj.bbox !== undefined){ |
648 | 648 |
// mapResponseObj.bbox are bounds for the projection of the specific layer |
649 | 649 |
var newBounds = OpenLayers.Bounds.fromString( mapResponseObj.bbox ); |
650 |
newBounds.transform(layers[0].projection, map.getProjectionObject()); |
|
650 |
//newBounds.transform(layers[0].projection, map.getProjectionObject()); |
|
651 |
newBounds.transform(CdmOpenLayers.projections.epsg_4326, referenceProjection()); |
|
651 | 652 |
if(dataBounds !== null){ |
652 | 653 |
dataBounds.extend(newBounds); |
653 | 654 |
} else if(newBounds !== undefined){ |
... | ... | |
655 | 656 |
} |
656 | 657 |
|
657 | 658 |
zoomToBounds = dataBounds; |
658 |
console.log("data layer zoomToBounds: " + zoomToBounds); |
|
659 |
console.log("createDataLayer() : data layer zoomToBounds: " + zoomToBounds);
|
|
659 | 660 |
zoomToClosestLevel = false; |
660 | 661 |
} |
661 | 662 |
} |
Also available in: Unified diff
fix #8347 fixing wrong projection transformation for data maps