openlayers

openlayer javascript bindings

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version 0.3.0
License BSD-2-Clause
CI Status Failing
Downloads 0
Last Indexed 2026-09-04 07:26

Authors

  • Jaremy Creechley

Installation

nimble install openlayers
choosenim install openlayers
git clone https://github.com/elcritch/openlayers-nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
openlayers - - - - - - -

Dependencies

Package Version Optional
https://github.com/elcritch/bunnery >= 0.3 No
karax - No
p5nim - No
ajax - No
https://github.com/openlayers/openlayers - No

Source

Repository https://github.com/elcritch/openlayers-nim
Homepage https://github.com/elcritch/openlayers-nim
Registry Source nimble_official

README

openlayers-nim

Nim JS bindings for OpenLayers. It follows typescript bidings mostly. Mostly generated with Codex, but guided to provide mostly sane API choices. PRs for more bindings / typed APIs accepted.

The best "docs" are to follow the OpenLayers docs and the ported examples below.

Examples

The interactive example app and individual example modules are in examples/. It uses Karax to switch between the examples.

  • Main router app: examples/app.nim
  • Per-example modules:
  • examples/simple.nim
  • examples/semiTransparentLayer.nim
  • examples/selectFeatures.nim
  • examples/selectHoverFeatures.nim
  • examples/drawFeatures.nim
  • examples/earthquakesHeatmap.nim
  • examples/drawModifyTraceSnap.nim
  • examples/layerOpacity.nim
  • examples/attributions.nim
  • examples/center.nim
  • examples/iconSymbolizer.nim
  • examples/markerAnimation.nim
  • examples/geoJSON.nim
  • examples/layerGroups.nim

Build the app:

  • nim js -d:nodejs examples/app.nim

Serve examples locally:

  • nim r examples/server.nim
  • Open http://127.0.0.1:8080/examples/examples.html

You can also build any individual example module directly, for example:

  • nim js -d:nodejs examples/drawFeatures.nim

Options

This module assumes ESM style modules, which can be opted out of by passing -d:openlayers.noEsmModules.