Add an image vector layer for rendering vectors to an image
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import Map from '../src/ol/Map.js';
|
||||
import View from '../src/ol/View.js';
|
||||
import GeoJSON from '../src/ol/format/GeoJSON.js';
|
||||
import VectorImageLayer from '../src/ol/layer/VectorImage.js';
|
||||
import VectorLayer from '../src/ol/layer/Vector.js';
|
||||
import VectorSource from '../src/ol/source/Vector.js';
|
||||
import {Fill, Stroke, Style, Text} from '../src/ol/style.js';
|
||||
@@ -19,8 +20,7 @@ const style = new Style({
|
||||
|
||||
const map = new Map({
|
||||
layers: [
|
||||
new VectorLayer({
|
||||
renderMode: 'image',
|
||||
new VectorImageLayer({
|
||||
source: new VectorSource({
|
||||
url: 'data/geojson/countries.geojson',
|
||||
format: new GeoJSON()
|
||||
|
||||
Reference in New Issue
Block a user