Reputation: 788
I'm getting the following error when trying to use the webgl renderer - "Uncaught TypeError: rq[c] is not a function ol.js:408"
map = new ol.Map({
interactions: interactions,
layers: [
new ol.layer.Tile({
preload: Infinity,
source: source
}),
vectorLayer
],
renderer: 'webgl',
target: 'map',
view: new ol.View({
projection: proj,
center: [5841, -1347],
zoom: 5,
minZoom:5 ,
maxZoom: 6,
extent: [0, -imgHeight, imgWidth, 0],
})
});
Everything works fine when I switch 'renderer: 'webgl' to renderer: 'canvas'.
I'm testing in Chrome (up to date) and using this as reference
Upvotes: 0
Views: 1144
Reputation: 3142
Only the canvas renderer supports vector data. The docs for the renderer option contains "Note that at present only the Canvas renderer supports vector data". http://openlayers.org/en/v3.6.0/apidoc/ol.Map.html
If you really want vector data with the webgl renderer, consider using ol.source.ImageVector.
Upvotes: 3