<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create Your Own Custom Map for Power BI. in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/639426#M1870</link>
    <description>&lt;P&gt;Please try using API 1.13.0 if it works there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PBI isolation might break some libraries that work by injecting JS from remote hosts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2019 14:37:23 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2019-03-07T14:37:23Z</dc:date>
    <item>
      <title>Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636253#M1845</link>
      <description>&lt;P&gt;I try to create own custom visual with bing maps. I added script "&lt;A href="https://www.bing.com/api/maps/mapcontrol?callback=InitMap" target="_blank"&gt;https://www.bing.com/api/maps/mapcontrol?callback=InitMap&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;and div with Id:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;this&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;divMap&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;d3&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;select&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;options&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;element&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;append&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'div'&lt;/SPAN&gt;&lt;SPAN&gt;) &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;classed&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'map'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;true&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;attr&lt;/SPAN&gt;&lt;SPAN&gt;({ &lt;/SPAN&gt;&lt;SPAN&gt;id:&lt;/SPAN&gt; &lt;SPAN&gt;"map_id"&lt;/SPAN&gt;&lt;SPAN&gt;}); &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But when I want to create a global function&amp;nbsp;InitMap. Power Bi doesn't see it.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I did:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;declare&lt;/SPAN&gt; &lt;SPAN&gt;function&lt;/SPAN&gt; &lt;SPAN&gt;InitMap&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;void&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;And in&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;Visual constructor:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(window as any).InitMap= this.InitMap;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This code doesn't want to work. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When&amp;nbsp; I create a new script with the text of function, it's work:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;let scriptMapBody = document.createElement('script');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;scriptMapBody.type = "text/javascript"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;scriptMapBody.text = " function InitMap() \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;var map = new Microsoft.Maps.Map(document.getElementById('map_id'),{ \&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;credentials: ''}&lt;/SPAN&gt;&lt;SPAN&gt;);\&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is there any way to create this function in ts code?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Mar 2019 12:52:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636253#M1845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-04T12:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636398#M1851</link>
      <description>&lt;P&gt;Our suggestion is to check window.&lt;SPAN&gt;InitMap and window.window.InitMap.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What Custom Visuals API version are you using?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 16:37:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636398#M1851</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2019-03-04T16:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636905#M1861</link>
      <description>&lt;P&gt;&lt;SPAN&gt;window.&lt;/SPAN&gt;&lt;SPAN&gt;InitMap and window.window.InitMap don't help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 08:20:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/636905#M1861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-05T08:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/637883#M1864</link>
      <description>&lt;P&gt;What API version are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI creates a copy of window for isolating Power BI JS from Custom Visual JS. It might be a root cause of this issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 06:48:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/637883#M1864</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2019-03-06T06:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/638096#M1867</link>
      <description>&lt;P&gt;I use&amp;nbsp; API v2.3.0&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2019 09:29:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/638096#M1867</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-06T09:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/639426#M1870</link>
      <description>&lt;P&gt;Please try using API 1.13.0 if it works there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PBI isolation might break some libraries that work by injecting JS from remote hosts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Ignat Vilesov,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Software Engineer&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt; color: #333333;"&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2019 14:37:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/639426#M1870</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2019-03-07T14:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Your Own Custom Map for Power BI.</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/641327#M1882</link>
      <description>&lt;P&gt;Thanks. It's helps&lt;/P&gt;</description>
      <pubDate>Sun, 10 Mar 2019 21:52:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Create-Your-Own-Custom-Map-for-Power-BI/m-p/641327#M1882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-03-10T21:52:50Z</dc:date>
    </item>
  </channel>
</rss>

