Namespace: has

ol.has


import has from 'ol/has';

Members

ol.has.CANVAS{boolean}

True if both the library and browser support Canvas. Always false if ol.ENABLE_CANVAS is set to false at compile time.

ol.has.DEVICE_ORIENTATION{boolean}

Indicates if DeviceOrientation is supported in the user's browser.

ol.has.DEVICE_PIXEL_RATIO{number}

The ratio between physical pixels and device-independent pixels (dips) on the device (window.devicePixelRatio).

ol.has.GEOLOCATION{boolean}

Is HTML5 geolocation supported in the current browser?

ol.has.TOUCH{boolean}

True if browser supports touch events.

ol.has.WEBGL{boolean}

True if both OpenLayers and browser support WebGL. Always false if ol.ENABLE_WEBGL is set to false at compile time.