Degrade gracefully if WebGL is not supported
This commit is contained in:
@@ -21,10 +21,12 @@ var webglMap = ol.createMap(
|
|||||||
document.getElementById('webglMap'),
|
document.getElementById('webglMap'),
|
||||||
{},
|
{},
|
||||||
ol.RendererHint.WEBGL);
|
ol.RendererHint.WEBGL);
|
||||||
webglMap.bindTo('center', domMap);
|
if (!goog.isNull(webglMap)) {
|
||||||
webglMap.bindTo('layers', domMap);
|
webglMap.bindTo('center', domMap);
|
||||||
webglMap.bindTo('resolution', domMap);
|
webglMap.bindTo('layers', domMap);
|
||||||
webglMap.bindTo('rotation', domMap);
|
webglMap.bindTo('resolution', domMap);
|
||||||
|
webglMap.bindTo('rotation', domMap);
|
||||||
|
}
|
||||||
|
|
||||||
var attributionView = new ol.view.Attribution(domMap);
|
var attributionView = new ol.view.Attribution(domMap);
|
||||||
document.getElementById('attribution').appendChild(
|
document.getElementById('attribution').appendChild(
|
||||||
|
|||||||
Reference in New Issue
Block a user