Install
openclaw skills install openlayersBuild, debug, and integrate OpenLayers web maps, including map/view setup, XYZ and OSM base layers, vector sources, GeoJSON overlays, Web Mercator and WGS84 handling, feature styling, click/pointer interaction, layer ordering, fit-to-extent flows, and frontend integration for vanilla HTML, Vite, React, and similar apps. Use when the user asks for OpenLayers code, `ol` usage, OpenLayers debugging, web GIS map implementation, or migration guidance from Leaflet/Mapbox. 中文触发:OpenLayers、ol 地图、前端 GIS、GeoJSON 地图、矢量图层、Web Mercator、地图交互、OpenLayers 调试。
openclaw skills install openlayersUse this skill for practical OpenLayers web map work in browser apps.
OpenLayers is the right choice when the user needs a stronger GIS-style 2D web map stack than Leaflet, especially for projection-aware workflows, tiled and vector layers, custom styling, feature interaction, and more explicit control over map/view/source/layer composition.
fromLonLat(...) or explicit dataProjection and featureProjection.Map.View projection, incoming data projection, and display projection explicit.fromLonLat([lng, lat]) for geographic coordinates shown on the default Web Mercator map.dataProjection and featureProjection when the source CRS is known.fromLonLat(...), or whether GeoJSON projections were omitted.forEachFeatureAtPixel(...) usage.map.updateSize() after the container becomes visible or resizes.Map, one View, and one base TileLayer.OSM or XYZ only after confirming the tile URL and attribution requirements.fromLonLat(...) when starting from geographic coordinates.VectorSource with a GeoJSON format object.dataProjection and featureProjection explicitly when precision matters.vectorSource.getExtent() after features load.map.on("singleclick", ...) for primary feature selection.forEachFeatureAtPixel(...) to identify the top visible feature.Source and Layer objects across updates.map.setTarget(undefined) to release DOM bindings.Draw, Modify, or Select only when the user explicitly needs editing.project, wgs84, or cgcs2000 as appropriate.qgis.leaflet may be simpler.mapbox.cesium.python3 {baseDir}/scripts/openlayers_scaffold.py minimal --out ./openlayers-demo.html
python3 {baseDir}/scripts/openlayers_scaffold.py geojson --out ./openlayers-geojson.html --geojson ./data/sample.geojson
{baseDir}/references/patterns.md when generating or fixing OpenLayers code.{baseDir}/references/layer-recipes.md when the task involves XYZ, OSM, GeoJSON, WMS, WMTS, or feature interaction patterns.