Last active
January 8, 2021 15:23
-
-
Save MaxDragonheart/679a230a3fd3d851d7a9a80ae35a6b3a to your computer and use it in GitHub Desktop.
Code for DirectOpenLayers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './style.css'; | |
import { | |
MapInizialized, MapSetView, BaseMapLayer, | |
wfsLayer | |
} from './directopenlayers'; | |
const mapCanvas = new MapInizialized('map'); | |
const mapCanvasView = new MapSetView(0, 90, 4); | |
const basemap = new BaseMapLayer('OSM'); | |
const osm = basemap.createOSMStandard(); | |
mapCanvas.addLayer(osm); | |
const wfsData = new wfsLayer( | |
'POLYGON', | |
'Buildings' | |
); | |
const vector = wfsData.createWFSLayer( | |
'https://gis.massimilianomoraca.it/geoserver/MassimilianoMoraca/wfs', | |
'geomedia_edificicasalnuovo', | |
'rgba(0, 0, 255, 1.0)', | |
null, | |
null, | |
0.5, | |
'rgba(0, 255, 0, 1.0)' | |
); | |
mapCanvas.addLayer(vector); | |
wfsData.zoomToExtent(50, 50, 50, 50, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment