Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map not showing its shows blank screen. #86

Closed
saibrahamaiah opened this issue Oct 1, 2016 · 18 comments
Closed

Map not showing its shows blank screen. #86

saibrahamaiah opened this issue Oct 1, 2016 · 18 comments

Comments

@saibrahamaiah
Copy link

The map isn't showing up in my application. The map view has the Google logo on the bottom left, but it's otherwise blank. I tried removing and re-adding the plugin, but that didn't work either.
So i tried removed and added in the plugin but not worked.These below commands i used...

tns remove nativescript-google-maps-sdk
tns add nativescript-google-maps-sdk

The API key is specified in the proper file according to the instructions, so that's definitely not the issue.

@nickcoury
Copy link
Contributor

For me that has happened in a few circumstances. First, make sure you have a live internet connection within the app, otherwise it can't download maps.

Next, make sure the app itself hasn't frozen, crashed, or been paused for some reason. Can you verify it's working using other UI components?

Third, I would double check you have a valid API key for the correct platform, in the correct format. I don't mean to question what you've done, but I've messed that up and seen the exact result you describe.

@saibrahamaiah
Copy link
Author

I have internet connection speed also good..
screenshot_20161003-103645

@dapriett
Copy link
Owner

dapriett commented Oct 3, 2016

Try viewing the android logs (adb logcat) - probably doesn't like you key.

@neopablix
Copy link

I have the same problem here. Something in particular to search for on the logs?

@abalad
Copy link

abalad commented Oct 15, 2016

I have the same problem here.

screenshot_2016-10-15-12-30-35

@dapriett
Copy link
Owner

Look in the android logcat, see if there is anything related to google services api. If you're on an old android device, there is a known issue with Android 4.2.2: #7

@abalad
Copy link

abalad commented Oct 19, 2016

This is logcat...

D/OpenGLRenderer(13211): CanvasContext() 0x7f920639c0 initialize 0x7fa924ce10 E/GED (13211): Failed to get GED Log Buf, err(0) I/OpenGLRenderer(13211): Initialized EGL, version 1.4 D/MALI (13211): eglCreateContext:206: [MALI] eglCreateContext display 0x7fa905f280, share context 0x0 here. E/b (13211): Authentication failed on the server. E/Google Maps Android API(13211): Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map. D/MALI (13211): gles_context_new:248: Create GLES ctx 0x7f92231008 successfully D/MALI (13211): eglCreateContext:543: [MALI] eglCreateContext end. Created context 0x7f92221940 here. E/libGLESv2(13211): init_tshook E/Google Maps Android API(13211): In the Google Developer Console (https://console.developers.google.com) E/Google Maps Android API(13211): Ensure that the "Google Maps Android API v2" is enabled. E/Google Maps Android API(13211): Ensure that the following Android Key exists: E/Google Maps Android API(13211): API Key: AIzaSyCbIkTmFkfqDewyUF-Qw2tgLqnMZqcHup0 E/Google Maps Android API(13211): Android Application (<cert_fingerprint>;<package_name>): 23:7D:3A:46:D5:83:22:4D:E9:E4:18:A3:9E:AF:71:21:A4:52:71:84;org.nativescript.APPOTISEG D/ActivityThread( 2103): SVC-UNBIND_SERVICE handled : 0 / BindServiceData{token=android.os.BinderProxy@28feabc7 intent=Intent { act=com.google.android.gms.usagereporting.service.START p kg=com.google.android.gms }} D/ActivityThread( 2103): SVC-Destroying service: com.google.android.gms.usagereporting.service.UsageReportingService@2d183142 D/ActivityThread( 2103): SVC-STOP_SERVICE handled : 0 / android.os.BinderProxy@28feabc7 D/libtspower(13211): /proc/13211/maps: offset is 0x92D20000, size is 45056, system bit is 64, version(2.01.18) D/libtspower(13211): ts_funcs_arr[3]: min = 0x7f92d24dd8, max = 0x7f92d2504c D/libtspower(13211): encrypt data in file begin = 19928, end = 20556 D/libtspower(13211): begin decrypt... D/libtspower(13211): end decrypt. D/libtspower(13211): in ts_init D/libGLESv2(13211): loaded libtspower.so D/ActivityThread( 3079): SVC-UNBIND_SERVICE handled : 0 / BindServiceData{token=android.os.BinderProxy@1f7ab5a3 intent=Intent { cmp=com.google.android.gms/.maps.auth.ApiTokenService }} I/SurfaceFlinger( 267): EventThread Client Pid (13211) created D/ActivityThread( 3079): SVC-Destroying service: com.google.android.gms.maps.auth.ApiTokenService@1adf361b D/ActivityThread( 3079): SVC-STOP_SERVICE handled : 0 / android.os.BinderProxy@1f7ab5a3 I/OpenGLRenderer(13211): Get enable program binary service property (1) I/OpenGLRenderer(13211): Initializing program atlas... D/ProgramBinary/Service(13211): BpProgramBinaryService.getFileDescriptor D/ProgramBinary/Service(13211): BpProgramBinaryService.getProgramMapLen D/ProgramBinary/Service(13211): BpProgramBinaryService.getProgramMapArray D/ProgramBinary/Service(13211): BpProgramBinaryService.getProgramBinaryLen I/OpenGLRenderer(13211): Program binary detail: Binary length is 121028, program map length is 112. I/OpenGLRenderer(13211): Succeeded to mmap program binaries. File descriptor is 92, and path is /dev/ashmemo�. I/OpenGLRenderer(13211): No need to use file discriptor anymore, close fd(92). D/OpenGLRenderer(13211): TaskManager() 0x7fa92282f0, cpu = 8, thread = 4 D/OpenGLRenderer(13211): Enabling debug mode 0 D/Surface (13211): Surface::connect(this=0x7fa924ce00,api=1) I/BufferQueueProducer( 267): [org.nativescript.APPOTISEG/com.tns.NativeScriptActivity](this:0x7fa5bdf000,id:213,api:1,p:13211,c:267) connect(P): api=1 producer=(13211:org.nativescript. APPOTISEG) producerControlledByApp=true

@dapriett
Copy link
Owner

dapriett commented Oct 19, 2016

Looks like an issue with your API key:

Authentication failed on the server. 
E/Google Maps Android API(13211): Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map. 
E/Google Maps Android API(13211): In the Google Developer Console (https://console.developers.google.com)
E/Google Maps Android API(13211): Ensure that the "Google Maps Android API v2" is enabled. E/Google Maps Android API(13211): Ensure that the following Android Key exists: E/Google Maps Android API(13211): API Key: ...

@abalad
Copy link

abalad commented Oct 19, 2016

But the key I'm using already functions normally in other apps ..
Any permissions that have to give the app?

@dapriett
Copy link
Owner

Do you have Google Maps Android API enabled for that key?

@abalad
Copy link

abalad commented Oct 20, 2016

Sorry @dapriett really was it, I was using a JavaScript API Key.

@abalad
Copy link

abalad commented Oct 20, 2016

Resolved: Using Google Maps Android API KEY and not the Google Maps JavaScript KEY.

@dapriett
Copy link
Owner

Glad it worked, good luck.

@aayush26
Copy link

Adding another point that solved my scenario:

  1. Check logcat and verify that in logcat, the fingerprint:package_name is same as the API Key generated one.

It was different in my case as I used the generate api link present in auto-generated google_maps_api.xml, which apparently gave a wrong package name, and hence the package name mentioned in the logcat was the correct one and on updating the package name in google developer console, it worked.

@kakaye-mkubwa
Copy link

helpful thread

@welkinakash5
Copy link

I have the same issue, how can i check the API key being used is correct or not. Gmap = mapView.getMap(); should be replaced with getMapAsync() as it is precoded. I have created another key but still map do not appear ..just it is as google and blank

@kakaye-mkubwa
Copy link

Run the app while your device is connected to android studio, then check logcat for fingerprint:package_name, you can search for it and check the API key and package name from there

@ozturksirin
Copy link

it helped me solve my problem please pay attention to the package name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants