A simple map services engine developed for KATSANA™.
Coming soon!
Once install, you should be able to easily import the library using the following:
const Atlas = require('./atlas.js');
window.Atlas = Atlas;
L.mapbox.accessToken = 'xyz';
Atlas.config({
mapbox: {
accessToken: L.mapbox.accessToken,
styles: {
Street: 'mapbox.street'
}
}
})
Coming soon!
Atlas uses the concept of driver to make it easier for developer to swap between Google Map Developer API with Mapbox Developer API.
const google = (new Atlas()).driver('google');
const mapbox = (new Altas()).driver('mapbox');
let canvas = mapbox.newCanvas('map', {});
let position = mapbox.newPosition(3.161907, 101.617954)
let routing = mapbox.newRouting(canvas, {});
routing.start(position);