Skip to content

Commit

Permalink
#49 let FigisMap handle OL3 option to reproject raster data (ocean ba…
Browse files Browse the repository at this point in the history
…semap)
  • Loading branch information
eblondel committed Nov 9, 2016
1 parent 162ea8a commit 1c4c65a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions WebContent/js/FigisMap/FigisMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ FigisMap.defaults = {
mapSize : 'S',
layerFilter : '',
layerStyle : '*',
layerStyles : { distribution : 'all_fao_areas_style', intersecting : '*', associated : '*' }
layerStyles : { distribution : 'all_fao_areas_style', intersecting : '*', associated : '*' },
enableRasterProjection : false
};

/**
Expand Down Expand Up @@ -2288,13 +2289,15 @@ FigisMap.renderer = function(options) {
//baselayer
var baselayerList = new Array();

if(projection == 4326 || projection == 900913){
//@eblondel 09/11/2016 testing raster reprojection by OL3
if( (FigisMap.defaults.enableRasterProjection && ol.ENABLE_RASTER_REPROJECTION) || projection == 4326 || projection == 900913){
for(var i=0;i<p.base.length;i++){
baselayerList.push(FigisMap.ol.configureBaseLayer(p.base[i], boundsOrigin));
}
}else{
baselayerList.push(FigisMap.ol.configureBaseLayer(p.defaultBase, boundsOrigin));
}

//baselayer group
var baselayers = new ol.layer.Group({
'title': FigisMap.ol.baselayersLabel + ((baselayerList.length > 1)? "s" : ""),
Expand Down
7 changes: 5 additions & 2 deletions WebContent/js/firms/firms.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,17 @@ FV.baseMapParams = function() {
};

//baselayers
this.base = [{
var baselayers = FigisMap.defaults.baseLayers.slice();
baselayers.reverse();
this.base = baselayers;
/*this.base = [{
cached: true,
filter: "",
label: "Oceans basemap",
layer: FigisMap.fifao.obl,
title: "Oceans basemap",
type: "base"
}];
}];*/

// this.associated = [ FigisMap.fifao.rfb ];
this.vectorLayer = {};
Expand Down

0 comments on commit 1c4c65a

Please sign in to comment.