赞
踩
import Map from 'ol/Map.js'; import View from 'ol/View.js'; import {MapboxVectorLayer} from 'ol-mapbox-style'; const map = new Map({ target: 'map', layers: [ new MapboxVectorLayer({ styleUrl: 'mapbox://styles/mapbox/bright-v9', accessToken: 'Your Mapbox access token from https://mapbox.com/ here', }), ], view: new View({ center: [0, 0], zoom: 2, }), });
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mapbox Vector Layer</title>
<link rel="stylesheet" href="node_modules/o
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。