function reProjectWGStoBCalbers(wfsBbox) {
  var coordsWgsString = wfsBbox.split(',');
  //console.log(coordsWgsString);
  var coordsWgs = [];
  for (i=0;i<coordsWgsString.length-1;i++) {
    var coord = coordsWgsString[i];
    coordsWgs.push(parseFloat(coord));
  }
  console.log(coordsWgs);
  //Project from WGS to BC Albers
  //if only 1 projection is given then it is assumed that it is being projected from WGS84 
  var coordsBCalb1 = proj4(crsBCalb, coordsWgs.slice(0,2));
 //console.log('coordsBCalb1 ' + coordsBCalb1);
  var coordsBCalb2 = proj4(crsBCalb, coordsWgs.slice(2,4));
  //console.log('coordsBCalb2 ' + coordsBCalb2);
  var coordsBCalb = [];
  coordsBCalb.push.apply(coordsBCalb, coordsBCalb1);
  coordsBCalb.push.apply(coordsBCalb, coordsBCalb2);
  //console.log('coordsBCalb ' + coordsBCalb);
  var bboxBCalb = coordsBCalb.toString();
  //console.log(bboxBCalb);
  return bboxBCalb;
}
//Convert WGS to BC Albers for cql_filter
Convert WGS to BC Albers for cql_filter
Convert WGS to BC Albers for cql_filter
function reProjectWGStoBCalbers(wfsBbox) {
  var coordsWgsString = wfsBbox.split(',');
  var coordsWgs = [];
  for (i=0;i<coordsWgsString.length-1;i++) {
    var coord = coordsWgsString[i];
    coordsWgs.push(parseFloat(coord));
  }
  console.log(coordsWgs);
  var coordsBCalb1 = proj4(crsBCalb, coordsWgs.slice(0,2));
  var coordsBCalb2 = proj4(crsBCalb, coordsWgs.slice(2,4));
  var coordsBCalb = [];
  coordsBCalb.push.apply(coordsBCalb, coordsBCalb1);
  coordsBCalb.push.apply(coordsBCalb, coordsBCalb2);
  var bboxBCalb = coordsBCalb.toString();
  return bboxBCalb;
}
function reProjectWGStoBCalbers ( wfsBbox ) { var coordsWgsString = wfsBbox . split ( ',' ) ; var coordsWgs = [ ] ; for ( i = 0 ; i < coordsWgsString . length - 1 ; i ++ ) { var coord = coordsWgsString [ i ] ; coordsWgs . push ( parseFloat ( coord ) ) ; } console . log ( coordsWgs ) ; var coordsBCalb1 = proj4 ( crsBCalb , coordsWgs . slice ( 0 , 2 ) ) ; var coordsBCalb2 = proj4 ( crsBCalb , coordsWgs . slice ( 2 , 4 ) ) ; var coordsBCalb = [ ] ; coordsBCalb . push . apply ( coordsBCalb , coordsBCalb1 ) ; coordsBCalb . push . apply ( coordsBCalb , coordsBCalb2 ) ; var bboxBCalb = coordsBCalb . toString ( ) ; return bboxBCalb ; }
Convert WGS to BC Albers for cql_filter
Convert WGS to BC Albers for cql_filter
//console.log(coordsWgsString); //Project from WGS to BC Albers //if only 1 projection is given then it is assumed that it is being projected from WGS84  //console.log('coordsBCalb1 ' + coordsBCalb1); //console.log('coordsBCalb2 ' + coordsBCalb2); //console.log('coordsBCalb ' + coordsBCalb); //console.log(bboxBCalb);