Is there a way to embed on a list item? Like storing the link in a list rich text column and when the item is opened, it will display the map?

enter image description here

  • Sharepoint online or on-premise? – Christoffer Oct 25 '18 at 17:55
  • SharePoint Online – Tamras Merin Oct 25 '18 at 19:08

Are you using modern lists? An alternative to embedding an iframe could be to use View Formatting. View formatting simply uses JSON and can really improve the design of a SharePoint list.


A good example with Google Maps integrated can be found here: https://github.com/SharePoint/sp-dev-list-formatting/tree/master/view-samples/contact-card-format

| improve this answer | |

Not in SharePoint Online Calculated Columns. They removed the "bug" that we used to use for this.

You should still be able to get there using a workflow, but it may not work on Modern UI pages.

| improve this answer | |
  • I'm not really using calculated column. User can just copy and paste the <iframe> from google and I just want the map to be displayed on DispForm.aspx when opened -- rather than displaying the <iframe> text. I've used workflow to insert html code in rich text box, which works on list view, but I can't get it to work with <iframe> – Tamras Merin Oct 25 '18 at 19:55

We can add the code below into script editor web part into the DispForm.aspx page to achieve it.

<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
    var $googleMap=$("td.ms-formlabel:contains('Google Map')").next();
    $googleMap.html($googleMap.html().replace('&lt;','<').replace('&gt;', '>'));     
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.