Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Last active April 24, 2021 15:09
Show Gist options
  • Save chrisobriensp/dcf1f0e60d7e71d67766216deb2d7f4b to your computer and use it in GitHub Desktop.
Save chrisobriensp/dcf1f0e60d7e71d67766216deb2d7f4b to your computer and use it in GitHub Desktop.
SharePoint column formatting JSON to render a small map from latitude/longitude co-ordinates (e.g. from Power Apps GPS) - expected column name is "MapLocation"
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "img",
"attributes": {
"class": " ms-borderColor-neutralLighter",
"src": "='https://dev.virtualearth.net/REST/v1/Imagery/Map/Road/'+[$MapLocation]+'?mapSize=280,215&key=[Your Bing Maps key here]'"
},
"txtContent": "[$MapLocation]"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment