Kind of but it’s not so easy. The last time I mess with any of this MainUI’s map library wouldn’t really let you draw your location over time. You could only drop markers on the map. And a bunch of disconnected markers with no sense of order or time isn’t all that useful.
So what ends up being required is to store the last N locations in a String Item and then create a static HTML page with some JavaScript to parse that string and draw the path on the map using an embeded Google Maps widget. I suppose soemthing similar might work with OpenMap or one of the other map providers, but the APIs will be different so the overall approach may be different.
I found it to work OK but abandonded it as too complicated and klunky to maintain for the benefit it provided.
It seems like something that MainUI could support. But no one has volunteered to implement it. It could be worth an issue.
Just the markers on the map - that will be enough for my needs. I can include a timestamp in their description - it will be enugh for me. But I still have some questions:
a) How do I retrieve historical location data from this item?
b) How do I dynamically (via script?) add markers to the map view?
What you’d have to do is decide how many markers you want to display. Then create an Item for each marker. And then have a rule that maintains the Items.
You cannot access the persisted values from a map card; only Items.
You don’t. You create a Map Page. On the page you define an oh-map-marker for each Item you defined above.