Hi Community,
So I'm seeing if I can create a rudimentary fitness tracker in power apps. I cant see a way to trace routes like strava so I was hoping that I could use a dot (pushpin) placed every five seconds to get a similar effect.
The app is currently set up with the following in the on timer end property of a timer
Solved! Go to Solution.
Hi @PowerAppsDawg :
Do you want to show multiple points in a Bing map?
Do you want to draw a movement track according to the user's walking route?
The key is using URL.(Draw Pushpoints on a map of the USA using the drawCurve Parameter)
The first important issue I want to explain is that the number of these points is limited.
If you use the HTTP GET method with any of the following URL templates, you can specify up to 18 pushpins in the URL.
Secondly,my suggestion is to increase the sampling interval according to your needs (such as 8 minutes), and then connect these points with a line.
I've made a test for your reference:
My data source(SharePoint List): BingMap (You need a database to store data)
Title | Single line of text |
Latitude | Single line of text |
longitude | Single line of text |
1/Add a Text Input control(TextInput1) /*Create Event Theme*/
2/Add a timer control./*used to upload location information regularly.*/
Duration:
480000 /*8 minutes between each upload*/
OnTimerStart:
Patch(
BingMap,
Defaults(BingMap),
{
Title: TextInput1.Text,
Latitude: Location.Latitude,
longitude: Location.Longitude
}
)
Repeat:
true
OnSelect:
UpdateContext({var:!var}) /*Var is my custom variable*/
Text:
If(var,"Stop","Start") /*Make the timer more user-friendly. When "Start" is displayed, the user can click Start, and then it will display "Stop".*/
3\Add a image control:
Image:
"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road?&"
&
Concat(AddColumns(
Filter(BingMap,Title=TextInput1.Text),/*Only need the activity track of this activity*/
"pp",
"pp=" & Latitude & "," & longitude & ";" & 2 & ";"
),
pp,
"&"
) /*Adjust the data table to the string required by the URL through the combination functions*/
&"&dc=l,,3"&
"&key=AivzmzqHNnj7ZFj1kBy-y3jwUi47k786wERV8Z-5HN4hnwqRtArHBQnfyjpxnVZV" /*” Aivzmzq……“ is my key*/
/*To present the results, I used experimental data (not real data)*/
Best Regards.
Bof
Hi @PowerAppsDawg :
Do you want to show multiple points in a Bing map?
Do you want to draw a movement track according to the user's walking route?
The key is using URL.(Draw Pushpoints on a map of the USA using the drawCurve Parameter)
The first important issue I want to explain is that the number of these points is limited.
If you use the HTTP GET method with any of the following URL templates, you can specify up to 18 pushpins in the URL.
Secondly,my suggestion is to increase the sampling interval according to your needs (such as 8 minutes), and then connect these points with a line.
I've made a test for your reference:
My data source(SharePoint List): BingMap (You need a database to store data)
Title | Single line of text |
Latitude | Single line of text |
longitude | Single line of text |
1/Add a Text Input control(TextInput1) /*Create Event Theme*/
2/Add a timer control./*used to upload location information regularly.*/
Duration:
480000 /*8 minutes between each upload*/
OnTimerStart:
Patch(
BingMap,
Defaults(BingMap),
{
Title: TextInput1.Text,
Latitude: Location.Latitude,
longitude: Location.Longitude
}
)
Repeat:
true
OnSelect:
UpdateContext({var:!var}) /*Var is my custom variable*/
Text:
If(var,"Stop","Start") /*Make the timer more user-friendly. When "Start" is displayed, the user can click Start, and then it will display "Stop".*/
3\Add a image control:
Image:
"https://dev.virtualearth.net/REST/v1/Imagery/Map/Road?&"
&
Concat(AddColumns(
Filter(BingMap,Title=TextInput1.Text),/*Only need the activity track of this activity*/
"pp",
"pp=" & Latitude & "," & longitude & ";" & 2 & ";"
),
pp,
"&"
) /*Adjust the data table to the string required by the URL through the combination functions*/
&"&dc=l,,3"&
"&key=AivzmzqHNnj7ZFj1kBy-y3jwUi47k786wERV8Z-5HN4hnwqRtArHBQnfyjpxnVZV" /*” Aivzmzq……“ is my key*/
/*To present the results, I used experimental data (not real data)*/
Best Regards.
Bof
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
195 | |
67 | |
46 | |
41 | |
28 |
User | Count |
---|---|
255 | |
119 | |
86 | |
84 | |
81 |