Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Leadformance/batMap

Repository files navigation

BatMap

The goal of this tiny lib is to offer a common interface to allow basic usage of multiple map providers.

The only thing that change will be the chosen provider and its API Key. All your map interaction logic will stay the same regardless of the provider chosen. On the other hand, it is possible to overload all methods if it is needed for customization.

Providers available:

Getting Started

See the full documentation.

Development

Run the example project

Run npm run build-dev and launch the example folder on a local server. Any changes will be watched.

Validate your code

Run npm run test to launch the tests (Jest - documentation).

Testing your devs

If you need to test your developments before releasing, you can push the compiled filed to Github Pages. To do this, just run npm run gh-deploy.

You'll find the generated files on this link: https://leadformance.github.io/batMap/dist/[PROVIDER].[min].js

Deploy your devs

To deploy and release your code you have to merge your branch on master.

Now you can switch on master and run npm run deploy <versions> (version: major|minor|patch). It will generate the folder dist with every provider js (normal and minified).

Now you can use this version in your project.

Compatibility

Google Map Mappy Leaflet SVG Marker
Chrome
Firefox
Opera
Safari
IE11
EDGE