KWGT Map and direction arrow (or turn map to match traveling direction)

I have an Android head unit in my car, and have created a KWGT that displays a map with my current location. The code is :

$("https://maps.googleapis.com/maps/api/staticmap?center="+ li(lat) +", "+ li(lon) +"&zoom=15&size=600x400&key=MY_API_KEY")$

I have also added a triangle shape that is placed in the center to represent me (my location in the map). All works well. The map updates slowly as I’m driving - maybe every 30-45 seconds - but that’s OK. It’s more for quick reference, not actual driving. The issue is that the map is always configured NORTH up, so if I’m driving south the map is “upside down/backwards”. I have searched all weekend for how to make either the map or triangle rotate based upon the direction I’m traveling…but all I’ve found is AI generated formulas that don’t actually seem to exist in KWGT (si(gps), ni(heading), li(dir) etc…). The only formula that seems to change the orientation of either the map or the arrow is wi(wdir)…but that’s for wind direction, so it’s not right either.

Does anyone have any suggestions? Is it possible to have either the map rotate based on the direction I’m traveling per gps/other? At the very least, have the arrow point in the correct direction on the map???

Thanks all!

1 Like

EDIT - Nevermind. I figured it out. Read the notes on the Reddit page and discovered I needed to change the location from alternate to default in the Layer setting. :grin:

After many more attempts, I give up trying to calculate my GPS bearing. Instead, I have downloaded/installed both Maps Widget V3 Komponet Large & Maps Widget V3 Komponet (M). Much appreciation to the creator of those fine widgets! Unfortunately, I have am issue with V3 Komponet (pictured on top).

The widget with the large Google icon locates me correctly while the other one places me about 15 miles away. I have checked the formulas for both - one correctly identifies my lat & long but the other has completely different lat & long results…even though I am checking both widgets in the exact same location.

Any thoughts on why this is, or how to fix it?