Skip to content

Instantly share code, notes, and snippets.

@MaxDragonheart
Created January 8, 2021 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaxDragonheart/5557bc9f98f893461a0cda39da706977 to your computer and use it in GitHub Desktop.
Save MaxDragonheart/5557bc9f98f893461a0cda39da706977 to your computer and use it in GitHub Desktop.
Code for DirectOpenLayers
import './style.css';
import {
MapInizialized, MapSetView, BaseMapLayer,
wmsLayer
} from './directopenlayers';
const mapCanvas = new MapInizialized('map');
const mapCanvasView = new MapSetView(14.425, 40.825, 13);
const basemap = new BaseMapLayer('OSM');
const osm = basemap.createOSMStandard();
mapCanvas.addLayer(osm);
const wmsTestSource = new wmsLayer(
'Sentinel 2, B12',
'https://gis.massimilianomoraca.it/geoserver/MassimilianoMoraca/wms'
);
const wmsTest = wmsTestSource.createWMSLayer(
'wildfires_20170712',
null,
16,
10,
0
);
mapCanvas.addLayer(wmsTest);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment