Skip to content

GPS for Javascript not TypeScript #7

Description

@mrwrighty

I am migrating a project to NS7+ that had broken plugins that did not support NS7. I've moved from nativescript-geolocation to @nativescript-community/gps

I'm trying to translate the TS example in to JS, I've not made the move to TS as my app is written in JS and annoyed that all examples tend to use TypeScript rather than JavaScript and the documentation is non existent.

Im setting up GPS using the following:

var gps_master = require("@nativescript-community/gps");
var gps = new gps_master();

But get an error

NativeScript encountered a fatal error: Uncaught TypeError: gps_master is not a constructor

How do I declare GPS and get location values in Javascript to pass to ui-mapbox

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions