Add an image vector layer for rendering vectors to an image

This commit is contained in:
Tim Schaub
2018-11-04 11:25:36 -07:00
parent ae1f3afd66
commit 2ec509fbca
19 changed files with 543 additions and 466 deletions

View File

@@ -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()