Start OpenLayers easily.
- OpenLayers v6.5.0
- webpack v5.11.1
- node v15.5.0
- npm v7.3.0
Install package
npm install
build
npm run build
dev
npm run dev
./_resouce/js
script.js
import Map from 'ol/Map';
import View from 'ol/View';
import { fromLonLat } from 'ol/proj';
import olms from 'ol-mapbox-style';
// MIERUNE Streets読み込み
const styleJson =
'https://api.maptiler.com/maps/jp-mierune-streets/style.json?key=[APIキー]';
const map = new Map({
target: 'map',
view: new View({
center: fromLonLat([139.767, 35.681]),
zoom: 14,
}),
});
olms(map, styleJson);
MIT
Copyright (c) 2021 MIERUNE Inc.
OpenLayersを手軽に始める
- OpenLayers v6.5.0
- webpack v5.11.1
- node v15.5.0
- npm v7.3.0
パッケージインストール
npm install
ビルド
npm run build
開発
npm run dev
./_resouce/js
script.js
import Map from 'ol/Map';
import View from 'ol/View';
import { fromLonLat } from 'ol/proj';
import olms from 'ol-mapbox-style';
// MIERUNE Streets読み込み
const styleJson =
'https://api.maptiler.com/maps/jp-mierune-streets/style.json?key=[APIキー]';
const map = new Map({
target: 'map',
view: new View({
center: fromLonLat([139.767, 35.681]),
zoom: 14,
}),
});
olms(map, styleJson);
MIT
Copyright (c) 2021 MIERUNE Inc.