0.11.0 • Published 5 years ago
olcs-mod v0.11.0
olcs
OL-Cesium as ES2016 modules.
Usage
Add the olcs-mod
(and ol
) package as a dependency to your project.
npm install olcs-mod --save
Import just what you need for your application:
import Map from 'ol/map';
import View from 'ol/view';
import TileLayer from 'ol/layer/tile';
import XYZ from 'ol/source/xyz';
import OLCesium from 'olcs-mod/OLCesium';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
})
})
],
view: new View({
center: [0, 0],
zoom: 2
})
});
new OLCesium({map});
Create an alias to the goog
directory. With webpack:
resolve: {
alias: {
'goog': path_to_goog,
}
}