https://github.com/nekromoff/osmlove
OSM map drawing support for Lua LÖVE game engine
https://github.com/nekromoff/osmlove
games geojson library love-game-engine love2d lua openstreetmap openstreetmaps osm
Last synced: 2 months ago
JSON representation
OSM map drawing support for Lua LÖVE game engine
- Host: GitHub
- URL: https://github.com/nekromoff/osmlove
- Owner: nekromoff
- License: gpl-3.0
- Created: 2017-04-05T00:34:23.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-06T21:41:38.000Z (about 8 years ago)
- Last Synced: 2025-02-01T12:45:31.661Z (3 months ago)
- Topics: games, geojson, library, love-game-engine, love2d, lua, openstreetmap, openstreetmaps, osm
- Language: Lua
- Homepage:
- Size: 5.6 MB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OSMLOVE
OSM map drawing support for LÖVE engineOSM Love - library for drawing maps in LOVE game engine
## Info
Use this library to draw a map from geoJSON file.
Only points and lines supported at the moment with set of basic rules (define color only).
Future plans:
* optimize parser speed
* add support for simple and complex polygons
* add support for complex rules (line width, borders etc.)
* add support for OSM XML format## Code examples
See main.lua for simple example.
Include osmlove modules in your code:
```
local osmlove = require 'osmlove'
```Initialize map in `love.load`:
```
osmlove.init(filename, region, width, height, zoom)
```Draw a map to screen in `love.draw`:
```
osmlove.drawMap(rules)
```## Get geoJSON files
You can quickly get some samples here:
* https://mapzen.com/data/metro-extracts/## Author, license, dependencies
(c) 2017+ Daniel Duris, [email protected]License: GNU GPL v3
### Depends on:
* json.lua (MIT License)
* xl.lua (public domain)