Package Exports
- ol
- ol/AssertionError
- ol/Collection
- ol/CollectionEventType
- ol/CollectionEventType.js
- ol/Disposable
- ol/Feature
- ol/Feature.js
- ol/Geolocation
- ol/Graticule
- ol/Image
- ol/ImageState.js
- ol/ImageTile
- ol/Kinetic
- ol/LayerType.js
- ol/Map
- ol/Map.js
- ol/MapBrowserEvent
- ol/MapBrowserEventType
- ol/MapBrowserEventType.js
- ol/MapBrowserPointerEvent
- ol/MapEvent
- ol/MapEvent.js
- ol/MapEventType
- ol/Object
- ol/Object.js
- ol/ObjectEventType
- ol/Observable
- ol/Observable.js
- ol/Overlay
- ol/Overlay.js
- ol/OverlayPositioning
- ol/OverlayPositioning.js
- ol/PluggableMap
- ol/PluggableMap.js
- ol/Tile
- ol/TileState
- ol/TileState.js
- ol/View
- ol/View.js
- ol/ViewHint
- ol/WebGLMap
- ol/array
- ol/array.js
- ol/asserts
- ol/asserts.js
- ol/centerconstraint
- ol/color
- ol/color.js
- ol/colorlike
- ol/control
- ol/control.js
- ol/control/Attribution
- ol/control/Control
- ol/control/FullScreen
- ol/control/MousePosition
- ol/control/MousePosition.js
- ol/control/OverviewMap
- ol/control/OverviewMap.js
- ol/control/Rotate
- ol/control/ScaleLine
- ol/control/Zoom
- ol/control/ZoomSlider
- ol/control/ZoomSlider.js
- ol/control/ZoomToExtent
- ol/control/util
- ol/coordinate
- ol/coordinate.js
- ol/css
- ol/dom
- ol/dom.js
- ol/easing
- ol/easing.js
- ol/events
- ol/events.js
- ol/events/Event
- ol/events/Event.js
- ol/events/EventType
- ol/events/EventType.js
- ol/events/condition
- ol/events/condition.js
- ol/extent
- ol/extent.js
- ol/featureloader
- ol/format
- ol/format.js
- ol/format/EsriJSON
- ol/format/EsriJSON.js
- ol/format/Feature
- ol/format/FormatType
- ol/format/GML
- ol/format/GML2
- ol/format/GML3
- ol/format/GPX
- ol/format/GeoJSON
- ol/format/GeoJSON.js
- ol/format/IGC
- ol/format/JSONFeature
- ol/format/KML
- ol/format/MVT
- ol/format/MVT.js
- ol/format/OSMXML
- ol/format/Polyline
- ol/format/Polyline.js
- ol/format/TopoJSON
- ol/format/WFS
- ol/format/WKT
- ol/format/WKT.js
- ol/format/WMSCapabilities
- ol/format/WMSGetFeatureInfo
- ol/format/WMTSCapabilities
- ol/format/WMTSCapabilities.js
- ol/format/filter
- ol/format/filter.js
- ol/format/filter/Bbox
- ol/format/filter/Contains
- ol/format/filter/During
- ol/format/filter/EqualTo
- ol/format/filter/GreaterThan
- ol/format/filter/GreaterThanOrEqualTo
- ol/format/filter/Intersects
- ol/format/filter/IsBetween
- ol/format/filter/IsLike
- ol/format/filter/IsNull
- ol/format/filter/LessThan
- ol/format/filter/LessThanOrEqualTo
- ol/format/filter/Not
- ol/format/filter/NotEqualTo
- ol/format/filter/Or
- ol/format/filter/Within
- ol/functions.js
- ol/geom
- ol/geom.js
- ol/geom/Circle
- ol/geom/Circle.js
- ol/geom/Geometry
- ol/geom/Geometry.js
- ol/geom/GeometryCollection
- ol/geom/GeometryLayout
- ol/geom/GeometryType
- ol/geom/GeometryType.js
- ol/geom/LineString
- ol/geom/LineString.js
- ol/geom/LinearRing
- ol/geom/MultiLineString
- ol/geom/MultiLineString.js
- ol/geom/MultiPoint
- ol/geom/MultiPoint.js
- ol/geom/MultiPolygon
- ol/geom/MultiPolygon.js
- ol/geom/Point
- ol/geom/Point.js
- ol/geom/Polygon
- ol/geom/Polygon.js
- ol/geom/SimpleGeometry
- ol/geom/SimpleGeometry.js
- ol/has
- ol/index
- ol/index.js
- ol/interaction
- ol/interaction.js
- ol/interaction/DoubleClickZoom
- ol/interaction/DragAndDrop
- ol/interaction/DragBox
- ol/interaction/DragPan
- ol/interaction/DragPan.js
- ol/interaction/DragRotate
- ol/interaction/DragRotateAndZoom
- ol/interaction/DragZoom
- ol/interaction/Draw
- ol/interaction/Draw.js
- ol/interaction/Extent
- ol/interaction/Interaction
- ol/interaction/Interaction.js
- ol/interaction/KeyboardPan
- ol/interaction/KeyboardZoom
- ol/interaction/Modify
- ol/interaction/MouseWheelZoom
- ol/interaction/PinchRotate
- ol/interaction/PinchZoom
- ol/interaction/Pointer
- ol/interaction/Pointer.js
- ol/interaction/Select
- ol/interaction/Select.js
- ol/interaction/Snap
- ol/interaction/Translate
- ol/layer
- ol/layer.js
- ol/layer/Base
- ol/layer/Group
- ol/layer/Group.js
- ol/layer/Heatmap
- ol/layer/Image
- ol/layer/Image.js
- ol/layer/Layer
- ol/layer/Layer.js
- ol/layer/Property
- ol/layer/Tile
- ol/layer/Tile.js
- ol/layer/Vector
- ol/layer/Vector.js
- ol/layer/VectorTile
- ol/layer/VectorTile.js
- ol/loadingstrategy
- ol/loadingstrategy.js
- ol/math
- ol/math.js
- ol/obj
- ol/obj.js
- ol/ol.css
- ol/pointer/EventType
- ol/pointer/PointerEvent
- ol/pointer/PointerEventHandler
- ol/proj
- ol/proj.js
- ol/proj/Projection
- ol/proj/Units
- ol/proj/Units.js
- ol/proj/epsg3857.js
- ol/proj/proj4
- ol/proj/proj4.js
- ol/proj/transforms
- ol/render
- ol/render.js
- ol/render/Event
- ol/render/Feature
- ol/render/ReplayType
- ol/render/VectorContext
- ol/render/canvas
- ol/render/canvas/Immediate
- ol/render/canvas/ReplayGroup
- ol/renderer/canvas/ImageLayer
- ol/renderer/canvas/ImageLayer.js
- ol/renderer/canvas/Layer
- ol/renderer/canvas/Layer.js
- ol/renderer/canvas/Map
- ol/renderer/canvas/TileLayer
- ol/renderer/canvas/TileLayer.js
- ol/renderer/canvas/VectorLayer
- ol/renderer/canvas/VectorTileLayer
- ol/renderer/vector
- ol/renderer/webgl/ImageLayer
- ol/renderer/webgl/Map
- ol/renderer/webgl/TileLayer
- ol/renderer/webgl/VectorLayer
- ol/size
- ol/size.js
- ol/source
- ol/source.js
- ol/source/BingMaps
- ol/source/BingMaps.js
- ol/source/CartoDB
- ol/source/Cluster
- ol/source/Cluster.js
- ol/source/Image
- ol/source/Image.js
- ol/source/ImageArcGISRest
- ol/source/ImageCanvas
- ol/source/ImageMapGuide
- ol/source/ImageStatic
- ol/source/ImageStatic.js
- ol/source/ImageWMS
- ol/source/ImageWMS.js
- ol/source/OSM
- ol/source/OSM.js
- ol/source/Raster
- ol/source/Source
- ol/source/Stamen
- ol/source/State
- ol/source/Tile
- ol/source/TileArcGISRest
- ol/source/TileDebug
- ol/source/TileImage
- ol/source/TileImage.js
- ol/source/TileJSON
- ol/source/TileJSON.js
- ol/source/TileWMS
- ol/source/TileWMS.js
- ol/source/UTFGrid
- ol/source/UrlTile
- ol/source/Vector
- ol/source/Vector.js
- ol/source/VectorEventType
- ol/source/VectorTile
- ol/source/VectorTile.js
- ol/source/WMSServerType
- ol/source/WMTS
- ol/source/WMTS.js
- ol/source/XYZ
- ol/source/XYZ.js
- ol/source/Zoomify
- ol/sphere
- ol/sphere.js
- ol/style
- ol/style.js
- ol/style/AtlasManager
- ol/style/Circle
- ol/style/Circle.js
- ol/style/Fill
- ol/style/Fill.js
- ol/style/Icon
- ol/style/Icon.js
- ol/style/IconAnchorUnits
- ol/style/IconAnchorUnits.js
- ol/style/IconImage
- ol/style/IconImage.js
- ol/style/IconImageCache
- ol/style/IconOrigin
- ol/style/IconOrigin.js
- ol/style/Image
- ol/style/Image.js
- ol/style/RegularShape
- ol/style/RegularShape.js
- ol/style/Stroke
- ol/style/Stroke.js
- ol/style/Style
- ol/style/Style.js
- ol/style/Text
- ol/style/Text.js
- ol/style/TextPlacement
- ol/tilegrid
- ol/tilegrid.js
- ol/tilegrid/TileGrid
- ol/tilegrid/WMTS
- ol/tilegrid/WMTS.js
- ol/tileurlfunction
- ol/transform
- ol/transform.js
- ol/uri
- ol/util
- ol/util.js
- ol/xml
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ol) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ol
OpenLayers as ES modules.
Usage
Add the ol package as a dependency to your project.
npm install ol --saveImport just what you need for your application:
import Map from 'ol/Map';
import View from 'ol/View';
import TileLayer from 'ol/layer/Tile';
import XYZ from 'ol/source/XYZ';
new Map({
target: 'map',
layers: [
new TileLayer({
source: new XYZ({
url: 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png'
})
})
],
view: new View({
center: [0, 0],
zoom: 2
})
});See the following examples for more detail on bundling OpenLayers with your application:
Module Identifiers
The module identifiers shown in the above snippet (e.g. ol/Map, note the CamelCase module name) are default exports of constructors. There are also modules like 'ol/proj' (note the lowercase module name), which provide named exports for utility functions and constants, e.g.
import {fromLonLat} from 'ol/proj';
map.setCenter(fromLonLat([16, 48]));See the API documentation for a reference of all modules, and just keep in mind: CamelCase modules provide a default export, lowercase modules provide named exports.