OpenLayers v4.0.1 API - Namespace: has

# Namespace: has

This documentation is for OpenLayers v4.0.1. The latest is v.

## 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.