This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@cieloazul310/vt-style-aoi
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@cieloazul310/vt-style-aoi

OpenLayers style package for GSI Vector Tile

Usage

1. Install

yarn add ol @cieloazul310/vt-style-aoi

2. Create the VectorTile layer

import VectorTileLayer from 'ol/layer/VectorTile';
import VectorTileSource from 'ol/source/VectorTile';
import MVTFormat from 'ol/format/MVT';

import vtStyle from '@cieloazul310/vt-style-aoi';

const vtLayer = new VectorTileLayer({
  source: new VectorTileSource({
    format: new MVTFormat(),
    url: 'https://cyberjapandata.gsi.go.jp/xyz/experimental_bvmap/{z}/{x}/{y}.pbf',
    attributions: '<a href="https://github.com/gsi-cyberjapan/gsimaps-vector-experiment" target="_blank" rel=”noopener noreferrer”>国土地理院</a>',
  }),
  style: vtStyle,
});

3. Create a map

import Map from 'ol/Map';
import View from 'ol/View';
import { fromLonLat } from 'ol/proj';

new Map({
  target: 'map',
  view: new View({
    center: fromLonLat([140.46, 36.37]),
    zoom: 12,
  }),
  layers: [vtLayer],
});

地理院地図Vector(仮称)提供実験 https://github.com/gsi-cyberjapan/gsimaps-vector-experiment

Dependents (0)

Package Sidebar

Install

npm i @cieloazul310/vt-style-aoi

Weekly Downloads

0

Version

0.0.3

License

ISC

Unpacked Size

65.8 kB

Total Files

110

Last publish

Collaborators

  • cieloazul310