import geoblaze from 'geoblaze';
import GeoRasterLayer from 'georaster-layer-for-leaflet';
import chroma from 'chroma-js';

const RasterService = {

  create_raster(input) {
    return new Promise((resolve, reject) => {
      geoblaze.load(input)
        .then(georaster => {
          let options = {
            georaster: georaster,
            opacity: 0.7
          };
          let raster = new GeoRasterLayer(options);
          resolve(raster);
        }, error => {
          reject(error);
        });
    });
  }
}

export default RasterService;

@@ -117,16 +117,249 @@
 a-js';%0A%0A
+const getResolution = () =%3E %7B%0A  const width = document.documentElement.clientWidth;%0A  if (width %3C 900) %7B%0A    return Math.pow(2, 5);%0A  %7D else if (width %3C 1200) %7B%0A    return Math.pow(2, 6);%0A  %7D else %7B%0A    return Math.pow(2, 7);%0A  %7D%0A%7D%0A%0A
 const Ra
@@ -586,16 +586,58 @@
 ity: 0.7
+,%0A            resolution: getResolution(),
 %0A       

add different resolutions based on screen size