Created
January 3, 2021 20:02
-
-
Save MaxDragonheart/cdb4bcc5e98b23fccf259aee24db6d48 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, | |
MapFullScreen, MapScaleLine, vectorsLayer | |
} from './directopenlayers'; | |
const mapCanvas = new MapInizialized('map'); | |
const mapCanvasView = new MapSetView(14.350, 40.905, 3); | |
const basemap = new BaseMapLayer('OSM'); | |
const osm = basemap.createOSMStandard(); | |
mapCanvas.addLayer(osm); | |
const pointData = new vectorsLayer( | |
'point', | |
'https://massimilianomoraca.it/api/geomedia/random-points/', | |
'Points' | |
); | |
const renderPointData = pointData.createCluster( | |
50, 'rgba(192,0,0,1.0)', 'rgba(255,128,0,1.0)', 'rgba(0,128,0,1.0)', | |
'rgba(0,0,255,1.0)', 'rgba(255,255,255,0.5)', 0, 0, | |
5, 'rgba(255,255,255,1.0)', 18, 0, | |
99 | |
); | |
mapCanvas.addLayer(renderPointData); | |
pointData.zoomOnCluster(100, 100, 100, 100, 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment