GithubHelp home page GithubHelp logo

Comments (5)

dapriett avatar dapriett commented on June 22, 2024

Looks like gradle can't find the play-services-maps Android library, which needs to be installed on your machine. Verify that you have the latest Google Play Services installed https://developer.android.com/sdk/installing/adding-packages.html

from nativescript-google-maps-sdk.

dapriett avatar dapriett commented on June 22, 2024

For my location, you should be able to do something like this, although I haven't tested it:

function onMapReady(args) {
    var mapView = args.object;
    var gMap = mapView.gMap;

    if(mapView.android) {
        gMap.setMyLocationEnabled(true);
    }

    if (mapView.ios) {
        gMap.myLocationEnabled(true);
    }
}

from nativescript-google-maps-sdk.

rodenp avatar rodenp commented on June 22, 2024

I had google play installed and after i added the google repository my project built successfully.
Also the my location button appeared on android after adding your code suggestion. I did have to add an extra permission to the android manifest:

Although everything builds ok and I can see the location button, there is no map shown.
Do you have any suggestions on why this might be?
I'm pretty sure the API key is correct as I have used it before.
It's difficult to debug since 1.5.1 no longer outputs the android logcat as default.

from nativescript-google-maps-sdk.

rodenp avatar rodenp commented on June 22, 2024

It now works perfectly.
Many thanks for your help with this.
My last issue as to do with incorrect credentials to the API.

from nativescript-google-maps-sdk.

dapriett avatar dapriett commented on June 22, 2024

Great - glad to hear it's working now. Enjoy!

from nativescript-google-maps-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.