OpenLayers
(186)
  • Docs
  • Examples
  • API
  • Code
Image ArcGIS MapServer
(arcgis-image.html)

Example of an image ArcGIS layer.

Bing Maps
(bing-maps.html)

Example of a Bing Maps layer.

View Animation
(animation.html)

Demonstrates animated pan, zoom, and rotation.

Attributions
(attributions.html)

Example of a attributions visibily change on map resize, to collapse them on small maps.

Tiled ArcGIS MapServer
(arcgis-tiled.html)

Example of a tiled ArcGIS layer.

Smoothing lines using Chaikins algorithm
(chaikin.html)

This uses Chaikins algorithm to smooth drawn lines.

Clustered Features
(cluster.html)

Example of using ol/source/Cluster.

CartoDB source example
(cartodb.html)

Example of a cartodb map.

Custom Interactions
(custom-interactions.html)

Example of a custom interaction.

Device Orientation
(device-orientation.html)

Listen to DeviceOrientation events.

Drag-and-Drop Image Vector
(drag-and-drop-image-vector.html)

Example of using the drag-and-drop interaction with image vector rendering.

Draw and Modify Features
(draw-and-modify-features.html)

Example of using the ol/interaction/Draw interaction together with the ol/interaction/Modify interaction.

Drag, Rotate, and Zoom
(drag-rotate-and-zoom.html)

A single interaction to drag, rotate, and zoom.

Draw Features
(draw-features.html)

Example of using the ol/interaction/Draw interaction.

Canvas Tiles
(canvas-tiles.html)

Renders tiles with coordinates for debugging.

Drag-and-Drop
(drag-and-drop.html)

Example of using the drag-and-drop interaction.

Dynamic Data
(dynamic-data.html)

Example of dynamic data.

Freehand Drawing
(draw-freehand.html)

Example using the ol/interaction/Draw interaction in freehand mode.

Earthquake Clusters
(earthquake-clusters.html)

Demonstrates the use of style geometries to render source features of a cluster.

Earthquakes with custom symbols
(earthquake-custom-symbol.html)

Demonstrates the use of `toContext` to create custom icon symbols.

Geographic Editing
(edit-geographic.html)

Editing geometries with geographic coordinates.

EPSG:4326
(epsg-4326.html)

Example of a map in EPSG:4326.

Custom map element
(es2015-custom-element.html)

Example of a custom element with a map.

Draw Shapes
(draw-shapes.html)

Using the ol/interaction/Draw to create regular shapes

Constrained Extent
(extent-constrained.html)

Example of a view with a constrained extent.

Map Export
(export-map.html)

Example of exporting a map as a PNG image.

Extent Interaction
(extent-interaction.html)

Using an Extent interaction to draw an extent.

Custom Animation
(feature-animation.html)

Demonstrates how to animate features.

Filtering features with WebGL
(filter-points-webgl.html)

Using WebGL to filter large quantities of features

Marker Animation
(feature-move-animation.html)

Demonstrates how to move a feature along a line.

Flight Animation
(flight-animation.html)

Demonstrates how to animate flights with ´postrender´.

GeoJSON
(geojson.html)

Example of GeoJSON features.

Geolocation
(geolocation.html)

Using geolocation to control a map view.

geojson-vt integration
(geojson-vt.html)

Slice GeoJSON into vector tiles on the fly in the browser.

WMS GetFeatureInfo (Image Layer)
(getfeatureinfo-image.html)

Using an image WMS source with GetFeatureInfo requests

WMS GetFeatureInfo (Tile Layer)
(getfeatureinfo-tile.html)

Issuing GetFeatureInfo requests with a WMS tiled source

GPX Data
(gpx.html)

Example of using the GPX source.

WMS GetFeatureInfo (Layers)
(getfeatureinfo-layers.html)

Shows how to fetch features per layer name in a single WMS GetFeatureInfo request

HERE Map Tile API
(here-maps.html)

Example of a map with map tiles from HERE.

Geolocation Tracking with Orientation
(geolocation-orientation.html)

Example of a geolocated and oriented map.

Map Graticule
(graticule.html)

This example shows how to add a graticule layer to a map.

Hit Tolerance
(hit-tolerance.html)

Example using the hitTolerance parameter.

Earthquakes Heatmap
(heatmap-earthquakes.html)

Demonstrates the use of a heatmap layer.

Vector Layer Hit Detection
(hitdetect-vector.html)

Example of hit detection on a countries vector layer with country information.

Icon Symbolizer
(icon.html)

Example using an icon to symbolize a point.

Icon Pixel Operations
(icon-negative.html)

Canvas pixel operations on a point icon.

IGC Data
(igc.html)

Example of tracks recorded from multiple paraglider flights on the same day, read from an IGC file.

Icon Sprites with WebGL
(icon-sprite-webgl.html)

Rendering many icons with WebGL

Icon Colors
(icon-color.html)

Example assigning a custom color to an icon

IIIF Image API
(iiif.html)

Example of a IIIF Image API source.

Image Filters
(image-filter.html)

Apply a filter to imagery

Immediate Rendering (Geographic)
(immediate-geographic.html)

Using the immediate rendering API with geometries in geographic coordinates.

Vector Image Layer
(image-vector-layer.html)

Example of rendering vector data as an image layer.

KML
(kml.html)

Rendering KML with a vector source.

Layer Spy
(layer-spy.html)

View a portion of one layer over another

Limited Layer Extent
(layer-extent.html)

Restricting layer rendering to a limited extent.

JSTS Integration
(jsts.html)

Example on how to use JSTS with OpenLayers.

Layer Zoom Limits
(layer-zoom-limits.html)

Using minZoom and maxZoom to control layer visibility.

Layer Swipe
(layer-swipe.html)

Example of a Layer swipe map.

Layer Z-Index
(layer-z-index.html)

Example of ordering layers using Z-index.

Magnify
(magnify.html)

Show a magnified version of imager under the pointer

Localized OpenStreetMap
(localized-openstreetmap.html)

Example of a localized OpenStreetMap map with a custom tile server and a custom attribution.

Mapbox-gl Layer
(mapbox-layer.html)

Example of a Mapbox-gl-js layer integration.

LineString Arrows
(line-arrows.html)

Example of drawing arrows for each line string segment.

MapGuide Untiled
(mapguide-untiled.html)

Example of a untiled MapGuide map.

View Min-Zoom
(min-zoom.html)

Demonstrates how the view's minimum zoom level can be changed.

Full-Screen Mobile
(mobile-full-screen.html)

Example of a full screen map.

Modify Features
(modify-features.html)

Editing features with the modify interaction.

Layer Min/Max Resolution
(min-max-resolution.html)

Show/hide layers depending on current view resolution.

Moveend Event
(moveend.html)

Use of the moveend event.

Mouse Position
(mouse-position.html)

Example of a mouse position control, outside the map.

Navigation Controls
(navigation-controls.html)

Shows how to add navigation controls.

Overview Map Control
(overviewmap.html)

Example of OverviewMap control.

Permalink
(permalink.html)

Example on how to create permalinks.

Page Scrolling
(page-scroll.html)

Shows a map that does not interrupt page scrolling.

Pinch Zoom
(pinch-zoom.html)

Restrict pinch zooming to integer zoom levels.

Custom Polygon Styles
(polygon-styles.html)

Showing the vertices of a polygon with a custom style geometry.

Preload Tiles
(preload.html)

Example of tile preloading.

Reprojection with EPSG.io Search
(reprojection-by-code.html)

Demonstrates client-side raster reprojection of OSM to arbitrary projection

Raster Reprojection
(reprojection.html)

Demonstrates client-side raster reprojection between various projections.

Regular Shapes
(regularshape.html)

Example of some Regular Shape styles.

OpenStreetMap Reprojection
(reprojection-wgs84.html)

Demonstrates client-side reprojection of OpenStreetMap in WGS84.

Render geometries to a canvas
(render-geometry.html)

Example of rendering geometries to an arbitrary canvas.

Reusable Source
(reusable-source.html)

Updating a tile source by changing the URL.

View Rotation
(rotation.html)

Example of a rotated map.

Image Reprojection
(reprojection-image.html)

Demonstrates client-side reprojection of single image source.

Scale Line
(scale-line.html)

Example of a scale line.

OpenStreetMap Reprojection with ScaleLine Control
(scaleline-indiana-east.html)

Demonstrates client-side reprojection of OpenStreetMap to NAD83 Indiana East.

Select Features
(select-features.html)

Example of using the Select interaction.

Select multiple Features
(select-multiple-features.html)

Example of selecting multiple features.

Select Features by Hover
(select-hover-features.html)

Example of selecting features by hovering.

Simple Map
(simple.html)

Example of a simple map.

Snap Interaction
(snap.html)

Example of using the snap interaction together with draw and modify interactions.

Sphere Mollweide
(sphere-mollweide.html)

Example of a Sphere Mollweide map with a Graticule layer.

Stamen Tiles
(stamen.html)

Example of a Stamen tile source.

Static Image
(static-image.html)

Example of a static image layer.

Synthetic Lines
(synthetic-lines.html)

Synthetic lines example.

Street Labels
(street-labels.html)

Render street names.

Synthetic Points
(synthetic-points.html)

Synthetic points example.

Teleporting Maps
(teleport.html)

Example of moving a map from one target to another.

Tile Transitions
(tile-transitions.html)

Custom configuration for opacity transitions on tiles.

Tissot Indicatrix
(tissot.html)

Draw Tissot's indicatrices on maps.

TileJSON
(tilejson.html)

Example of a TileJSON layer.

topolis integration
(topolis.html)

Example on how to use topolis with OpenLayers.

turf.js
(turf.html)

Example on how to use turf.js with OpenLayers.

Tracing around a polygon
(tracing.html)

Example of setting up a draw interaction to easily snap to an existing feature.

Panning and page scrolling
(two-finger-pan-scroll.html)

Shows a map that allows page scrolling unless two fingers or Cmd/Ctrl are used to pan the map.

Translate Features
(translate-features.html)

Example of a translate features interaction.

TopoJSON
(topojson.html)

Demonstrates rendering of features from a TopoJSON topology.

ArcGIS REST Feature Service
(vector-esri.html)

Example of using an ArcGIS REST Feature Service with a Tile strategy.

Vector Label Decluttering
(vector-label-decluttering.html)

Label decluttering with a custom renderer.

Editable ArcGIS REST Feature Service
(vector-esri-edit.html)

Example of using an ArcGIS REST Feature Service in an editing application.

Vector Layer
(vector-layer.html)

Example of a countries vector layer with country information.

OSM XML
(vector-osm.html)

Example of using the OSM XML source.

WFS - GetFeature
(vector-wfs-getfeature.html)

Example of making a WFS GetFeature request with a filter.

Vector Tile Selection
(vector-tile-selection.html)

Select features from vector tiles.

Vector tiles in EPSG:4326
(vector-tiles-4326.html)

Example showing vector tiles in EPSG:4326 (styled using ol-mapbox-style)

WFS
(vector-wfs.html)

Example of using WFS with a BBOX strategy.

WKT
(wkt.html)

Example of using the WKT parser.

WebGL points layer
(webgl-points-layer.html)

Using a WebGL-optimized layer to render a large quantities of points

Custom Tiled WMS
(wms-custom-proj.html)

Example of using custom coordinate transform functions.

WMS 512x256 Tiles
(wms-custom-tilegrid-512x256.html)

Example of a WMS layer with 512x256px tiles.

Single Image WMS
(wms-image.html)

Example of a single image WMS layer.

Single Image WMS with Proj4js
(wms-image-custom-proj.html)

Example of integrating Proj4js for coordinate transforms.

WMS GetLegendGraphic
(wms-getlegendgraphic.html)

Example of a WMS GetLegendGraphic.

Tiled WMS Wrapping
(wms-tiled-wrap-180.html)

Example of a tiled WMS layer that wraps across the 180° meridian.

Tiled WMS
(wms-tiled.html)

Example of a tiled WMS layer.

WMS without Projection
(wms-no-proj.html)

Example of two WMS layers using the projection EPSG:21781, which is unknown to the client.

WMS Time
(wms-time.html)

Example of smooth tile transitions when changing the time dimension of a tiled WMS layer.

WMTS
(wmts.html)

Example of a WMTS source.

WMTS Tile Transitions
(wmts-dimensions.html)

Example of smooth tile transitions when changing the dimension of a WMTS layer.

IGN WMTS
(wmts-ign.html)

Demonstrates displaying IGN (France) WMTS layers.

WMTS Layer from Capabilities
(wmts-layer-from-capabilities.html)

Example of a WMTS source created from a WMTS capabilities document.

XYZ Esri
(xyz-esri.html)

Example of a XYZ source using Esri tiles.

Worker
(worker.html)

This example should be deleted.

ArcGIS REST with 512x512 Tiles
(xyz-esri-4326-512.html)

Example of a XYZ source in EPSG:4326 using Esri 512x512 tiles.

Constrained Zoom
(zoom-constrained.html)

Example of a zoom constrained view.

XYZ Retina Tiles
(xyz-retina.html)

Example of Retina / HiDPI mercator tiles (512x512px) available as XYZ.

Zoomify
(zoomify.html)

Example of a Zoomify source.

XYZ
(xyz.html)

Example of a XYZ source.

Box Selection
(box-selection.html)

Using a DragBox interaction to select features.

Accessible Map
(accessible.html)

Example of an accessible map.

Custom Tooltips
(button-title.html)

This example shows how to customize the buttons tooltips with Bootstrap.

Styling feature with CanvasGradient or CanvasPattern
(canvas-gradient-pattern.html)

Example showing the countries vector layer styled with patterns and gradients.

Advanced View Positioning
(center.html)

This example demonstrates how a map's view can be adjusted so a geometry or coordinate is positioned at a specific pixel location.

Color Manipulation
(color-manipulation.html)

Demonstrates color manipulation with a raster source.

Custom Controls
(custom-controls.html)

Shows how to create custom controls.

d3 Integration
(d3.html)

Example of using OpenLayers and d3 together.

Export PDF example
(export-pdf.html)

Example of exporting a map as a PDF.

Fractal Rendering
(fractal.html)

Example of a fractal.

Full Screen Drag, Rotate, and Zoom
(full-screen-drag-rotate-and-zoom.html)

Example of drag rotate and zoom control with full screen effect.

Full Screen Control with extended source element
(full-screen-source.html)

Example of a full screen control with a source option definition.

Geographic Coordinates
(geographic.html)

Using geographic coordinates for the map view.

Full Screen Control
(full-screen.html)

Example of a full screen control.

Image Load Events
(image-load-events.html)

Example using image load events.

Earthquakes in KML
(kml-earthquakes.html)

Demonstrates the use of a Shape symbolizer to render earthquake locations.

Timezones in KML
(kml-timezones.html)

Demonstrates rendering timezones from KML.

Layer Groups
(layer-group.html)

Example of a map with layer group.

Layer Clipping
(layer-clipping.html)

Layer clipping example

Vector Clipping Layer
(layer-clipping-vector.html)

Vector Clipping Layer example

Lazy Source
(lazy-source.html)

Example of setting a layer source after construction.

Advanced Mapbox Vector Tiles
(mapbox-vector-tiles-advanced.html)

Example of a Mapbox vector tiles map with custom tile grid.

Vector tiles created from a Mapbox Style object
(mapbox-style.html)

Example of using ol-mapbox-style with tiles from maptiler.com.

Measure
(measure.html)

Using a draw interaction to measure lengths and areas.

Mapbox Vector Tiles
(mapbox-vector-tiles.html)

Example of a Mapbox vector tiles map.

Modify Features Test
(modify-test.html)

Example for testing feature modification.

OSM Vector Tiles
(osm-vector-tiles.html)

Using OpenStreetMap vector tiles.

Custom Overview Map
(overviewmap-custom.html)

Example of OverviewMap control with advanced customization.

Overlay
(overlay.html)

Demonstrates overlays.

Raster Source
(raster.html)

Demonstrates pixelwise operations with a raster source.

Popup
(popup.html)

Uses an overlay to create a popup.

Region Growing
(region-growing.html)

Grow a region from a seed pixel

Sea Level
(sea-level.html)

Render sea level at different elevations

Semi-Transparent Layer
(semi-transparent-layer.html)

Example of a map with a semi-transparent layer.

Shared Views
(side-by-side.html)

Two maps share view properties

Shaded Relief
(shaded-relief.html)

Calculate shaded relief from elevation data

SVG Layer
(svg-layer.html)

Example of a map with an interactive svg layer.

Tile Load Events
(tile-load-events.html)

Example using tile load events.

UTFGrid
(utfgrid.html)

This example shows how to read data from a UTFGrid source.

Vector Labels
(vector-labels.html)

Example of GeoJSON features with labels.

Vector Tile Info
(vector-tile-info.html)

Getting feature information from vector tiles.

WMS Capabilities Parsing
(wms-capabilities.html)

Example of parsing a WMS GetCapabilities response.

WMTS Capabilities Parsing
(wmts-capabilities.html)

Example of parsing a WMTS GetCapabilities response.

High DPI WMTS
(wmts-hidpi.html)

Example of a WMTS based HiDPI layer.

Zoom Sliders
(zoomslider.html)

Example of various ZoomSlider controls.

Vector tiles rendered in an offscreen canvas
(offscreen-canvas.html)

Example of a map that delegates rendering to a worker.

title