npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-navitia-sdk-ux

v1.1.8

Published

Cordova plugin for NavitiaSDKUX iOS & Android

Downloads

36

Readme

NavitiaSDK UX for Cordova

Cordova plugin for using NavitiaSDK UX

Installation

This plugin uses Carthage to build dependencies for iOS, please install it first: https://github.com/Carthage/Carthage

Then use this command to install the plugin

cordova plugin add cordova-plugin-navitia-sdk-ux

Setup for Android platform

This plugin uses Google Maps and requires a Google API key in case you're targeting the Android platform with your cordova application. You can get your own API key using this link: https://developers.google.com/maps/documentation/android-api/signup

You need to update your config.xml file as follows:

<widget ......... xmlns:android="http://schemas.android.com/apk/res/android">
    .
    .
    <platform name="android">
        .
        .
        <config-file parent="/manifest/application" target="AndroidManifest.xml">
            <meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY" />
        </config-file>
    </platform>
    .
    .
</widget>

Note that you have to change YOUR_API_KEY with your own API key!

Usage

NavitiaSDKUX.init(config, success, failure)

| Parameters | Type | Required | Description | Example | | --- | --- |:---:| --- | --- | | config | Object | ✓ | Configuration | | | config.token | String | ✓ | Token navitia | 0de19ce5-e0eb-4524-a074-bda3c6894c19 | | success | Function | ✓ | Success callback function | function() {} | | failure | Function | ✓ | Failure callback function | function(error) {} |

NavitiaSDKUX.invokeJourneyResults(params, success, failure)

| Parameters | Type | Required | Description | Example | | --- | --- |:---:| --- | --- | | params | Object | ✓ | Parameters of the screen | | | params.originId | String | ✓ | Origin coordinates, following the format lon;lat | 2.3665844;48.8465337 | | params.destinationId | String | ✓ | Destination coordinates, following the format lon;lat | 2.2979169;48.8848719 | | params.originLabel | String | ✗ | Origin label, if not set the address will be displayed | Home | | params.destinationLabel | String | ✗ | Destination label, if not set the address will be displayed | Work | | params.datetime | Date | ✗ | Requested date and time for journey results | new Date() | | params.datetimeRepresents | NavitiaSDKUX.DatetimeRepresents | ✗ | Can be NavitiaSDKUX.DatetimeRepresents.DEPARTURE (journeys after datetime) or NavitiaSDKUX.DatetimeRepresents.ARRIVAL (journeys before datetime). | NavitiaSDKUX.DatetimeRepresents.DEPARTURE | | params.forbiddenUris | [String] | ✗ | List of navitia uris | ['commercial_mode:Bus', 'line:1'] | | params.firstSectionModes | [NavitiaSDKUX.SectionMode] | ✗ | List of modes to use at the begining of the journey | [NavitiaSDKUX.SectionMode.CAR] | | params.lastSectionModes | [NavitiaSDKUX.SectionMode] | ✗ | List of modes to use at the end of the journey | [NavitiaSDKUX.SectionMode.BIKE, NavitiaSDKUX.SectionMode.BSS] | | params.count | Integer | ✗ | The number of journeys that will be displayed | 3 | | params.minNbJourneys | Integer | ✗ | The minimum number of journeys that will be displayed | 3 | | params.maxNbJourneys | Integer | ✗ | The maximum number of journeys that will be displayed | 10 | | success | Function | ✓ | Success callback function | function() {} | | failure | Function | ✓ | Failure callback function | function(error) {} |

Example

var config = {
    token: 'my-token',
};

NavitiaSDKUX.init(config, function() {}, function(error) {
    console.log(error);
});

var journeyParams = {
    originLabel: 'My Home',
    originId: '2.3665844;48.8465337',
    destinationId: '2.2979169;48.8848719',
};

NavitiaSDKUX.invokeJourneyResults(journeyParams, function() {}, function(error) {
    console.log(error);
});

Known issues

  • Color configuration not available yet (but soon!)

Troubleshooting

Specific android tools version : 26

In case you are having problems building and getting this kind of problems :

platforms/android/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name ...

You may try to override your android compiler environment variables :

export ORG_GRADLE_PROJECT_cdvCompileSdkVersion=android-26
export ORG_GRADLE_PROJECT_cdvBuildToolsVersion=26.0.1

More information on Cordova website

Manifest merger issue

This usually happens if you change the API key in the config.xml file. The build fails and you're getting this kind of error:

Element meta-data#com.google.android.geo.API_KEY at AndroidManifest.xml:xx:xx-xx duplicated with element declared at AndroidManifest.xml:xx:xx-xx

You may try to remove the Android platform and add it back again.