web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to add a Google map as an IFRAME - CRM 2013 (On-Premise)

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a request to add a Google map to a custom dashboard. I tried to add that as an IFRAME but it gives below error.

This content cannot be displayed in a frame.

To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.


It is much appreciated if anyone could help me.

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Lavanya,

    Try this link:

    thecrmwiz.com/.../using-google-maps-in-dynamics-crm

    Hope this helps.

    Regards,

    R.Rajkumar

    "Please mark my answer as verified if you found it helpful"

  • Suggested answer
    Jharana Baliyar Singh Profile Picture
    2,667 on at
  • Suggested answer
    Community Member Profile Picture
    on at

    I couldn't get any of the various simple suggestions around the web to work for embedding a google map link in an iframe.

    I ended up using the google map API script instead of an iframe, generating the initial code by filling in the boxes at:

    [View:http://www.map-embed.com/:750:50]

    and modifying the resultant code to suit my purposes.

    You could use the link above to gen the code for your own map, and then optionally use my code with the longitude and latitude produced by the above web site copied into my code. You can also insert your own html into "content" below, independent of what the above website produces.

       <?php

       // IE won't work with percentage height and FF won't work with em units.

       // Simple code here assumes if  browser isn't IE, then is FF;

       // And I don't care about other browsers.

       //

       $height =  "$browser" == 'ie' ? '25em' : '99%' ;

       $width  =  "$browser" == 'ie' ? '99%'  : '99%' ;

       echo <<<XXXEODXXX

         <script type="text/javascript" src="[View:http://maps.google.com/maps/api/js?sensor=false:750:50]">

         <div                    style='height:$height; width:$width; overflow:hidden;'>

           <div id="gmap_canvas" style='height:$height; width:$width;'>

           </div>

           <style>

             #gmap_canvas

               img

               {

                 max-width:none!important;

                 background:none!important

               }

           </style>

         </div>

         <script type="text/javascript">

           google.maps.event.addDomListener               ( window, 'load', init_map );

           function init_map ()

             { var myOptions = { zoom:12, center:new google.maps.LatLng ( 41.1889495, -104.1781593 ), mapTypeId:google.maps.MapTypeId.ROADMAP };

               map           = new google.maps.Map        ( document.getElementById ( "gmap_canvas" ), myOptions );

               marker        = new google.maps.Marker     ( {map: map, position: new google.maps.LatLng( 41.1889495, -104.1781593 ) } );

               infowindow    = new google.maps.InfoWindow ( { content:"<b>Biz Name</b><br/>Biz Street Address<br/>Biz City, State Zip<br/>Biz Phone" } );

               google.maps.event.addListener              ( marker, "click", function () { infowindow.open ( map, marker ); } );

               infowindow.open                            ( map, marker );

             }

         </script>

       XXXEODXXX;

    ?>

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans