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.

Google Maps card won't display mobile users' locations

See original GitHub issue

I know there’s a breaking change in 2022.9 for latitude and longitude. However, I didn’t see a respective solution for how to display mobile user locations in the Google Maps card like I had with all previous versions of Home Assistant mobile. I have temporarily reverted back Home Assistant mobile on all our phones to 2022.8 until I know how to display users’ locations in the Google Maps card again.

Could someone please assist me to fix the still image URL below to use respective longitude/latitude of each user? I currently have the still image URL in configuration.yaml; as, I don’t see a place to enter the URL in the Google Maps lovelace card.

Thank you so much for your help!

  - platform: generic
    name: 'Google Maps'
    still_image_url: https://maps.googleapis.com/maps/api/staticmap?size=800x800&maptype=hybrid&markers=color:red|label:A|{{ states.sensor.sm_g781v_2_geocoded_location.attributes.latitude }},{{ states.sensor.sm_g781v_2_geocoded_location.attributes.longitude }}&markers=color:purple|label:A|{{ states.sensor.sm_g781v_geocoded_location.attributes.latitude }},{{ states.sensor.sm_g781v_geocoded_location.attributes.longitude }}&markers=color:yellow|label:M|{{ states.device_tracker.kftrwi.attributes.latitude }},{{ states.device_tracker.kftrwi.attributes.longitude }}&markers=color:blue|label:M|{{ states.sensor.sm_n960u_geocoded_location.attributes.latitude }},{{ states.sensor.sm_n960u_geocoded_location.attributes.longitude }}&key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    limit_refetch_to_url_change: true

Home Assistant Android version: 2022.9

Android version: Android 12

Phone model: Samsung Note

Home Assistant version: 2022.9.4

Last working Home Assistant release (if known): 2022.8

Description of problem: Google Maps card no longer displays location of Home Assistant mobile users

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem:

Additional information:

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mkanetcommented, Sep 25, 2022

Dan your previous comments gave me the clue to resolving this issue! Thank you!!!

You were right, for whatever reason, the spaces in the URL will cause an error in Google’s API. I tried again your suggestion to render the URL without spaces in Developer Tools > Templates and then visit that URL in the browser… it worked in the browser! That’s when I suspected the issue would go away if I just remove the spaces from the URL in the configuration.yaml file.

I really appreciate your help. You’re a life-saver!

1reaction
dshokouhicommented, Sep 25, 2022

what happens if you render the URL in Developer Tools > Templates and then visit that URL in teh browser? does it work? Sorry thats about as far as I can take it. Hopefully someone helps out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Google Maps Not Working? [2022 Guide] - AirDroid
Step 1: Open Settings and select Connections > Data usage. Step 2: Navigate to the Mobile section, and select "Mobile data usage." Step...
Read more >
Use navigation in the Google Maps app - Android
To get easy, turn-by-turn navigation to places, use the Google Maps app. Maps shows you directions and uses real-time traffic information to find...
Read more >
Fix Google Maps Not Showing Map - Technipages
If Google Maps fails to load the map and the streets are not showing, this guide will show you how to fix the...
Read more >
29 Google Maps Tricks You Need to Try | PCMag
In the app, plug in your destination and start up driving directions. Tap the icon that shows your current location and a pop-up...
Read more >
Google Maps Platform FAQ
You may not access map tiles or satellite imagery through any mechanism besides the Google Maps Platform (such as the creation of your...
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