OpenLayers renders tiled maps, vectors, and markers in the browser from diverse sources. Install the ol npm package and import only the modules your page needs.
Overview
OpenLayers is a browser library for embedding dynamic maps in web pages. It can display tiled layers, vector features, and markers loaded from many formats and services, supporting geographic information use cases across industries.
Tiled layers work with XYZ sources such as OpenStreetMap, Bing, Mapbox, Stadia Maps, and OGC mapping services. Vector layers accept GeoJSON, TopoJSON, KML, GML, Mapbox vector tiles, and related encodings. Rendering uses Canvas 2D and WebGL with mobile-friendly defaults, and you can build slimmer bundles by importing specific components.
Developers style controls with CSS and extend behavior through the public API or companion libraries. TypeScript declarations ship with the npm package. Documentation includes hosted examples, a hands-on workshop, and API references; older major releases remain documented for gradual upgrades.
OpenLayers targets modern browsers above roughly one percent global usage, including Chrome, Firefox, Safari, and Edge, with polyfill guidance for legacy environments.
Key features
- XYZ and OGC tiled layers
- GeoJSON and vector tile support
- Canvas 2D and WebGL rendering
- Mobile-ready map interactions
- Modular npm package imports
- Bundled TypeScript declarations
- CSS-stylable map controls
- Extensible API hooks
Use cases
- Embedded situational maps
- Geospatial data viewers
- Real estate and asset maps
- Research and exploration UIs
- Engineering site dashboards