question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Map not showing up on Android

See original GitHub issue

I have the same piece of code working on iOS but on Android the map does not display. The map is initialized and I get the Google logo on the bottom, but nothing is displayed on the map itself

I am loading the map the standard way:


/**
 * Creates the map based on the Google sdk for android/iphone
 *
 */
var loadMap = function() {
  document.addEventListener("deviceready", function() {
    var div = document.getElementById("map_canvas");

    // Initialize the map view
    map = plugin.google.maps.Map.getMap(div);

    // Wait until the map is ready status.
    map.addEventListener(plugin.google.maps.event.MAP_READY, onMapReady);
  }, false);
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:26 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
schlauscommented, Jul 13, 2016

I was running into this problem today as well, and decided to really, really read the instructions for any clues. Found the critical part here:

As of version 1.2.0, you can put any HTML element on top of the map. You need to understand how this works.

The map is a native view, not related to JavaScript. It means the map and the browser are different views, the map is not rendered inside the browser view, such as HTML.

The map was being rendered, but there were elements on top of it that had an opaque background. I started making elements transparent via dev tools, and voilà, the map appeared!

Hope this helps others running into the same problem.

3reactions
davorpeiccommented, Aug 30, 2016

Ok, so for everyone still searching solution for blank map with Google logo and buttons but no actual map and are sure that their sha1 and bundle id and api key is correct 😃 I found that creating api key for android will not activate actual api’s. @chillyprig comment was calling my attention, so I check again, and yes, several apis weren’t enabled, so I enabled these ones, and after few minutes I could see the map generates in the app…

Hope it helps

apis

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Google Maps When It's Not Working on Android
How to Fix Google Maps When It's Not Working on Android · 1. Enable Location Accuracy · 2. Turn Off the Wi-Fi Only...
Read more >
How to fix Google Maps when it's not working How To
How to fix Google Maps when it's not working · Restart the app · Check Wi-Fi connection · Update the app · Clear...
Read more >
Android: Google Maps not displaying - Stack Overflow
Simplest way to fix this is go to the "google_maps_api.xml" file and copy the link in the file and paste it in the...
Read more >
How to fix Maps when it crashes - Android - Google Maps Help
On your Android phone or tablet, open the Settings app . · Tap Apps & notifications. · Follow the steps on your device...
Read more >
Fix Google Maps Not Showing Map - Technipages
Many app glitches on Android and iOS can quickly be fixed by updating your apps to the latest version. The same is valid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found