import Map from 'ol/Map'; import View from 'ol/View'; import TileLayer from 'ol/layer/Tile'; import TileJSON from 'ol/source/TileJSON'; const map = new Map({ layers: [ new TileLayer({ source: new TileJSON({ url: 'https://api.tiles.mapbox.com/v3/mapbox.geography-class.json?secure', crossOrigin: 'anonymous' }) }) ], target: 'map', view: new View({ center: [0, 0], zoom: 2 }) });