What is it?
This is a lightweight library for Game Closure that shows a map with basic features like zooming, moving and adding markers. It uses the Open Street Map API.
Demo
Use mouse wheel to zoom in/out and click-and-drag to move the map.
Example
Here is a basic example of usage:
var map = new Map({
superview: this,
width: device.width,
height: device.height
}, {
zMin: 2,
zMax: 18,
position: {
lat: 47.20696,
lon: -1.560413,
z: 17
}
});
Take a look at Application.js
in the repository for a more advanced example.
How to modify tiles appearance?
You can use another tiles provider or create your own provider. See more on http://wiki.openstreetmap.org/wiki/Tiles
Bug?
Do not hesitate to add an issue if you find a bug.
Improvements
I will upgrade this library with more features and better performances in the following months, but feel free to make a pull request if you want to participate :-)
Authors and Contributors
Godefroy de Compreignac (@Godefroy).