This plugin has been made essentialy to add support for Offline Maps for Cordova project.
I am using this plugin for Wizar
Android for now, iOS in the future.
Mapbox Android 8
This plugin is developed with Typescript and typing is splited between global scope module scope:
The global scope expose the Mapbox: IMapbox
object. You can access it through the window
object or directly by Mapbox
.
All the internal type or methods arugments types are available from the module cordova-plugin-mapbox
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.
The main API functions are demoed in a cordova app here: https://github.com/dagatsoin/cordova-plugin-mapbox-demo
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 (butzoomBy
is).
API doc is generated by TypeDoc and available here
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.