// Distance - the little * p is a global variable for pi to x decimal places Set(p,0.017453292519943295) you can set it on app start Round(12742 * Asin(Sqrt(0.5 - Cos((Location.Latitude - ThisItem.Lat) * p)/2 + Cos(ThisItem.Lat * p) * Cos(Location.Latitude * p) * (1 - Cos((Location.Longitude - ThisItem.Lon) * p)) / 2)),2) & " km" // Compass Bearing store this in a text box somewhere Round(Degrees(Atan2(Cos(Radians(Location.Latitude))*Sin(Radians(ThisItem.Lat))-Sin(Radians(Location.Latitude))*Cos(Radians(ThisItem.Lat))*Cos(Radians(ThisItem.Lon-Location.Longitude)),Sin(Radians(ThisItem.Lon-Location.Longitude))*Cos(Radians(ThisItem.Lon)))),0) // Using the compass Bearing Text box to display it on the screen with the powerapps compass too. "Bearing: "&If(Value(CompassBearing.Text)<0,Value(CompassBearing.Text)+360,Value(CompassBearing.Text)) & " Compass: " & Round(Compass.Heading,0) // Bing Maps code "http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/"& ThisItem.Lat &","&ThisItem.Lon & "/" & 16 & "?mapSize="& Image1.Width & "," & Image1.Height & "&pp="&ThisItem.Lat&","&ThisItem.Lon&";122&"& "dpi=normal"& "&key=" & BingMapsKey
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter