Forum Discussion
Add Location Details to SharePoint Data and Content
How will this look from a REST perspective?
e.g. what will the data look like if pulled into power BI? lat and long?
- Koen ZomersNov 26, 2018Copper Contributor
Just use the _api/web/lists/getbytitle('yourlist')/items URL to see the RAW data behind this field. For i.e. a field in which I entered the Microsoft HQ in Redmond, WA, it stores internally:
<d:Location>{"EntityType":"LocalBusiness","LocationSource":"Bing","LocationUri":"https://www.bingapis.com/api/v6/localbusinesses/YN873x16209519703153017334","UniqueId":"https://www.bingapis.com/api/v6/localbusinesses/YN873x16209519703153017334","DisplayName":"Microsoft Corporation","Address":{"Street":"1 Microsoft Way","City":"Redmond","State":"WA","CountryOrRegion":"US","PostalCode":"98052"},"Coordinates":{"Latitude":47.6398811340332,"Longitude":-122.12833404541016}}</d:Location>
- James JacksonDec 03, 2018Microsoft
Ariel Kropp wrote:
How will this look from a REST perspective?
e.g. what will the data look like if pulled into power BI? lat and long?
The main Location column stores all the location data as a JSON blob. APIs can be called to either return the full blob, or can call for specific information like geocoordinates, street address, place name, etc. by calling the related columns.
Calling individual sub columns will probably be the easiest method in most cases
- HarshaGraceJul 17, 2020Copper Contributor
I have tried this in SPFx and the concept for REST API is also the same.
https://sp.harshagracy.com/2020/07/save-location-details-to-sharepoint.html - HarshaGraceDec 10, 2020Copper Contributor