dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

google-maps-sdk : Blank map #204

Open farnazms opened 7 years ago

farnazms commented 7 years ago

Hi. I am new to nativescript, I've added nativescript-google-maps-sdk to a new project using:

tns plugin add nativescript-google-maps-sdk

Then I copied the file "nativescript_google_maps_api.xml" to "app\App_Resources\Android\values" and I put the api key to it:

My Key

and it is my page xml: `<Page xmlns="http://www.nativescript.org/tns.xsd" xmlns:maps="nativescript-google-maps-sdk"

`

but at the output result I see a blank map.

Did I made any mistake in my integration step? Thank you.

screenshot 2

dapriett commented 7 years ago

Blank map typically means the api key isn't setup correctly. Maybe you didn't turn on Google Maps Android API when you set up your api access. You can try the API key from the demo to test it out: https://github.com/dapriett/nativescript-google-maps-sdk/blob/master/demo/app/App_Resources/Android/values/nativescript_google_maps_api.xml

farnazms commented 7 years ago

Thank you, I edited my api key and it worked perfectly .

onurhanaytac commented 6 years ago

Hi, i have the same issue and try the api key from the demo but still got the same problem. i added a file to the /app/App_resources/Android/values/nativescript_google_maps_api.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="nativescript_google_maps_api_key">
        AIzaSyAtRVvG3Be3xXiZFR7xp-K-9hy4nZ4hMFs
    </string>
</resources>

like so. but i still got a blank page i read all the answers but cannot find a solution.