Skip to content

dagatsoin/cordova-plugin-mapbox

Repository files navigation

Mapbox plugin for Cordova

This plugin has been made essentialy to add support for Offline Maps for Cordova project.

I am using this plugin for Wizar

Support

OS

Android for now, iOS in the future.

Mapbox version

Mapbox Android 8

Typescript support

This plugin is developed with Typescript and typing is splited between global scope module scope:

Global scope

The global scope expose the Mapbox: IMapbox object. You can access it through the window object or directly by Mapbox.

Module scope

All the internal type or methods arugments types are available from the module cordova-plugin-mapbox

Typescript configuration

To access the types you will need to explicitly set the type folder roots. Get a look at the demo if you want a working config.

"typeRoots": ["./node_modules/@types", "./node_modules/cordova-plugin-mapbox"]

Refer to this SO question to know more about.

Demo

The main API functions are demoed in a cordova app here: https://github.com/dagatsoin/cordova-plugin-mapbox-demo

API

As this plugin is in development for years, the API does not reflect exactly the current Mapbox GL JS or the native API. For example, setZoom is not animated (but zoomBy is).

API doc is generated by TypeDoc and available here

Contribution

I am seeking help for two main tasks:

  • find a way to write test for the native code
  • develop the iOS platform

If you want to help, please contact me through a PR, I have not write contribution guide yet.

About

Mapbox plugin for Cordova 7+

Resources

Stars

Watchers

Forks

Packages

No packages published