Namespace: olx

olx

Namespaces

animation
control
format
interaction
layer
parser
render
source
style
tilegrid

Type Definitions

olx.AttributionOptions{Object} experimental

Properties:
Name Type Description
html string

HTML markup for this attribution.

olx.DeviceOptions{Object} experimental

Properties:
Name Type Description
loadTilesWhileAnimating boolean | undefined

When set to false, no tiles will be loaded while animating, which improves responsiveness on devices with slow memory. Default is true.

loadTilesWhileInteracting boolean | undefined

When set to false, no tiles will be loaded while interacting, which improves responsiveness on devices with slow memory. Default is true.

olx.DeviceOrientationOptions{Object} experimental

Properties:
Name Type Argument Description
tracking boolean | undefined <optional>

Start tracking. Default is false.

olx.FeatureOverlayOptions{Object} experimental

Properties:
Name Type Argument Description
features Array.<ol.Feature> | ol.Collection.<ol.Feature> | undefined <optional>

Features.

map ol.Map | undefined <optional>

Map.

style ol.style.Style | Array.<ol.style.Style> | ol.style.StyleFunction | undefined <optional>

Feature style.

olx.FrameState{Object} experimental

Properties:
Name Type Description
pixelRatio number
time number
viewState olx.ViewState

olx.GeolocationOptions{Object} experimental

Properties:
Name Type Argument Description
tracking boolean | undefined <optional>

Start Tracking. Default is false.

trackingOptions GeolocationPositionOptions | undefined <optional>

Tracking options. See http://www.w3.org/TR/geolocation-API/#position_options_interface.

projection ol.proj.ProjectionLike

The projection the position is reported in.

olx.GraticuleOptions{Object} experimental

Properties:
Name Type Argument Description
map ol.Map | undefined <optional>

Reference to an ol.Map object.

maxLines number | undefined <optional>

The maximum number of meridians and parallels from the center of the map. The default value is 100, which means that at most 200 meridians and 200 parallels will be displayed. The default value is appropriate for conformal projections like Spherical Mercator. If you increase the value more lines will be drawn and the drawing performance will decrease.

strokeStyle ol.style.Stroke | undefined <optional>

The stroke style to use for drawing the graticule. If not provided, the lines will be drawn with rgba(0,0,0,0.2), a not fully opaque black.

targetSize number | undefined <optional>

The target size of the graticule cells, in pixels. Default value is 100 pixels.

olx.LogoOptions{Object} experimental

Object literal with config options for the map logo.

Properties:
Name Type Description
href string

Link url for the logo. Will be followed when the logo is clicked.

src string

Image src for the logo

olx.MapOptions{Object} experimental

Object literal with config options for the map.

Properties:
Name Type Argument Description
controls ol.Collection.<ol.control.Control> | Array.<ol.control.Control> | undefined <optional>

Controls initially added to the map. If not specified, ol.control.defaults() is used.

deviceOptions olx.DeviceOptions | undefined <optional>

Device options for the map.

pixelRatio number | undefined <optional>

The ratio between physical pixels and device-independent pixels (dips) on the device. If undefined then it gets set by using window.devicePixelRatio.

interactions ol.Collection.<ol.interaction.Interaction> | Array.<ol.interaction.Interaction> | undefined <optional>

Interactions that are initially added to the map. If not specified, ol.interaction.defaults() is used.

keyboardEventTarget Element | Document | string | undefined <optional>

The element to listen to keyboard events on. This determines when the KeyboardPan and KeyboardZoom interactions trigger. For example, if this option is set to document the keyboard interactions will always trigger. If this option is not specified, the element the library listens to keyboard events on is the map target (i.e. the user-provided div for the map). If this is not document the target element needs to be focused for key events to be emitted, requiring that the target element has a tabindex attribute.

layers Array.<ol.layer.Base> | ol.Collection.<ol.layer.Base> | undefined <optional>

Layers. If this is not defined, a map with no layers will be rendered.

logo boolean | string | olx.LogoOptions | undefined <optional>

The map logo. A logo to be displayed on the map at all times. If a string is provided, it will be set as the image source of the logo. If an object is provided, the src property should be the URL for an image and the href property should be a URL for creating a link. To disable the map logo, set the option to false. By default, the OpenLayers 3 logo is shown.

overlays ol.Collection.<ol.Overlay> | Array.<ol.Overlay> | undefined <optional>

Overlays initially added to the map. By default, no overlays are added.

renderer ol.RendererType | Array.<(ol.RendererType|string)> | string | undefined <optional>

Renderer. By default, Canvas, DOM and WebGL renderers are tested for support in that order, and the first supported used. Specify a ol.RendererType here to use a specific renderer. Note that at present only the Canvas renderer supports vector data.

target Element | string | undefined <optional>

The container for the map, either the element itself or the id of the element. If not specified at construction time, ol.Map#setTarget must be called for the map to be rendered.

view ol.View | undefined <optional>

The map's view. No layer sources will be fetched unless this is specified at construction time or through ol.Map#setView.

olx.OverlayOptions{Object}

Object literal with config options for the overlay.

Properties:
Name Type Argument Description
element Element | undefined <optional>

The overlay element.

offset Array.<number> | undefined <optional>

Offsets in pixels used when positioning the overlay. The fist element in the array is the horizontal offset. A positive value shifts the overlay right. The second element in the array is the vertical offset. A positive value shifts the overlay down. Default is [0, 0].

position ol.Coordinate | undefined <optional>

The overlay position in map projection.

positioning ol.OverlayPositioning | string | undefined <optional>

Defines how the overlay is actually positioned with respect to its position property. Possible values are 'bottom-left', 'bottom-center', 'bottom-right', 'center-left', 'center-center', 'center-right', 'top-left', 'top-center', and 'top-right'. Default is 'top-left'.

stopEvent boolean | undefined <optional>

Whether event propagation to the map viewport should be stopped. Default is true. If true the overlay is placed in the same container as that of the controls (CSS class name ol-overlaycontainer-stopevent); if false it is placed in the container with CSS class name ol-overlaycontainer.

insertFirst boolean | undefined <optional>

Whether the overlay is inserted first in the overlay container, or appended. Default is true. If the overlay is placed in the same container as that of the controls (see the stopEvent option) you will probably set insertFirst to true so the overlay is displayed below the controls.

olx.ProjectionOptions{Object} experimental

Object literal with config options for the projection.

Properties:
Name Type Argument Description
code string

The SRS identifier code, e.g. EPSG:4326.

units ol.proj.Units | string

Units.

extent ol.Extent | undefined <optional>

The validity extent for the SRS.

axisOrientation string | undefined <optional>

The axis orientation as specified in Proj4. The default is enu.

global boolean | undefined <optional>

Whether the projection is valid for the whole globe. Default is false.

worldExtent ol.Extent | undefined <optional>

The world extent for the SRS.

olx.ViewOptions{Object} experimental

Object literal with config options for the view.

Properties:
Name Type Argument Description
center ol.Coordinate | undefined <optional>

The initial center for the view. The coordinate system for the center is specified with the projection option. Default is undefined, and layer sources will not be fetched if this is not set.

constrainRotation boolean | number | undefined <optional>

Rotation constraint. false means no constraint. true means no constraint, but snap to zero near zero. A number constrains the rotation to that number of values. For example, 4 will constrain the rotation to 0, 90, 180, and 270 degrees. The default is true.

enableRotation boolean | undefined <optional>

Enable rotation. Default is true.

extent ol.Extent | undefined <optional>

The extent that constrains the center, in other words, center cannot be set outside this extent. Default is undefined.

maxResolution number | undefined <optional>

The maximum resolution used to determine the resolution constraint. It is used together with minResolution (or maxZoom) and zoomFactor. If unspecified it is calculated in such a way that the projection's validity extent fits in a 256x256 px tile. If the projection is Spherical Mercator (the default) then maxResolution defaults to 40075016.68557849 / 256 = 156543.03392804097.

minResolution number | undefined <optional>

The minimum resolution used to determine the resolution constraint. It is used together with maxResolution (or minZoom) and zoomFactor. If unspecified it is calculated assuming 29 zoom levels (with a factor of 2). If the projection is Spherical Mercator (the default) then minResolution defaults to 40075016.68557849 / 256 / Math.pow(2, 28) = 0.0005831682455839253.

maxZoom number | undefined <optional>

The maximum zoom level used to determine the resolution constraint. It is used together with minZoom (or maxResolution) and zoomFactor. Default is 28. Note that if minResolution is also provided, it is given precedence over maxZoom.

minZoom number | undefined <optional>

The minimum zoom level used to determine the resolution constraint. It is used together with maxZoom (or minResolution) and zoomFactor. Default is 0. Note that if maxResolution is also provided, it is given precedence over minZoom.

projection ol.proj.ProjectionLike

The projection. Default is EPSG:3857 (Spherical Mercator).

resolution number | undefined <optional>

The initial resolution for the view. The units are projection units per pixel (e.g. meters per pixel). An alternative to setting this is to set zoom. Default is undefined, and layer sources will not be fetched if neither this nor zoom are defined.

resolutions Array.<number> | undefined <optional>

Resolutions to determine the resolution constraint. If set the maxResolution, minResolution, minZoom, maxZoom, and zoomFactor options are ignored.

rotation number | undefined <optional>

The initial rotation for the view in radians (positive rotation clockwise). Default is 0.

zoom number | undefined <optional>

Only used if resolution is not defined. Zoom level used to calculate the initial resolution for the view. The initial resolution is determined using the ol.View#constrainResolution method.

zoomFactor number | undefined <optional>

The zoom factor used to determine the resolution constraint. Default is 2.

olx.ViewState{Object} experimental

Properties:
Name Type Description
center ol.Coordinate
resolution number
rotation number