<?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: Does PBI Custom visuals support tiles maps ? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193176#M6155</link>
    <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I think so.&lt;/P&gt;&lt;P&gt;Have you faced any issues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2017 12:51:47 GMT</pubDate>
    <dc:creator>v-viig</dc:creator>
    <dc:date>2017-06-13T12:51:47Z</dc:date>
    <item>
      <title>Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193140#M6152</link>
      <description>&lt;P&gt;I'm currently working with leaflet. I try to display a tiles map using this library. Is it possible ?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 12:11:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193140#M6152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-13T12:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193176#M6155</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, I think so.&lt;/P&gt;&lt;P&gt;Have you faced any issues?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 12:51:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193176#M6155</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-06-13T12:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193202#M6158</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17823" data-lia-user-login="v-viig" class="lia-mention lia-mention-user"&gt;v-viig&lt;/a&gt;&amp;nbsp;Its working, But if I embed the code with into the option.element with innerHTML.&lt;/P&gt;&lt;P&gt;But when I try to make it with the method update() it doesn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 13:19:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193202#M6158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-13T13:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193205#M6160</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share the code that you use to include leaflet to the visual?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 13:23:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193205#M6160</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-06-13T13:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193211#M6161</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="17823" data-lia-user-login="v-viig" class="lia-mention lia-mention-user"&gt;v-viig&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;module powerbi.extensibility.visual {
    /**
     * Function that converts queried data into a view model that will be used by the visual
     *
     * @function
     * @param {VisualUpdateOptions} options - Contains references to the size of the container
     *                                        and the dataView which contains all the data
     *                                        the visual had queried.
     * @param {IVisualHost} host            - Contains references to the host which contains services
     */

    export class BarChart implements IVisual {
        private div: d3.Selection&amp;lt;SVGElement&amp;gt;;
        private host: IVisualHost;
        private barChartContainer: d3.Selection&amp;lt;SVGElement&amp;gt;;
        private barContainer: d3.Selection&amp;lt;SVGElement&amp;gt;;
        private bars: d3.Selection&amp;lt;SVGElement&amp;gt;;
        private target: HTMLElement;
        private g: d3.Selection&amp;lt;SVGAElement&amp;gt;;
        private object:any;
        private css: d3.Selection&amp;lt;SVGAElement&amp;gt;;
        private script: d3.Selection&amp;lt;SVGAElement&amp;gt;;



        static Config = {
            xScalePadding: 0.1,
        };

        /**
         * Creates instance of BarChart. This method is only called once.
         *
         * @constructor
         * @param {VisualConstructorOptions} options - Contains references to the element that will
         *                                             contain the visual and a reference to the host
         *                                             which contains services.
         */
        constructor(options: VisualConstructorOptions) {
            this.host = options.host;
            this.target = options.element;

/*
            this.script = d3.select(options.element)
            .append('script');
*/
/*
            this.css = d3.select(options.element)
            .append('link');
*/

/*
            this.div = d3.select(options.element)
            .append('div').attr("id","zakaria");
 */
let css = document.createElement("link");
css.rel = "stylesheet";
css.href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css";
this.target.appendChild(css);


 let mapDiv = document.createElement('div');
  mapDiv.id = 'zakaria';
  mapDiv.style.height = "100%";
  options.element.appendChild(mapDiv);


let js = document.createElement("script");
js.innerHTML= "var map = L.map('zakaria').setView([42.35,-71.08],13);";
this.target.appendChild(js);

js = document.createElement("script");
js.innerHTML= "L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);";
this.target.appendChild(js);


js = document.createElement("script");
js.src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js";
this.target.appendChild(js);
              
              
            
          

           
        }

        /**
         * Updates the state of the visual. Every sequential databinding and resize will call update.
         *
         * @function
         * @param {VisualUpdateOptions} options - Contains references to the size of the container
         *                                        and the dataView which contains all the data
         *                                        the visual had queried.
         */
        public update(options: VisualUpdateOptions) {
         //   let viewModel: BarChartViewModel = visualTransform(options, this.host);
            let width = options.viewport.width;
            let height = options.viewport.height;


       //    this.script.attr("src","https://unpkg.com/leaflet@1.0.3/dist/leaflet.js");

       //     this.css.attr({rel:"stylesheet",href: "https://unpkg.com/leaflet@1.0.3/dist/leaflet.css"});
       //    this.div.attr({width: width, height : height}); 





 }

        /**
         * Destroy runs when the visual is removed. Any cleanup that the visual needs to
         * do should be done here.
         *
         * @function
         */
        public destroy(): void {
            //Perform any cleanup tasks here
        }
    }
}&lt;/PRE&gt;&lt;P&gt;But since I want to do some manipulations, like defining polygons &amp;amp; use my DataView, I want to access the variables, and methods to have flexibility on the code, which is not the case while appending on innerHTML.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 14:02:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/193211#M6161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-13T14:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Does PBI Custom visuals support tiles maps ?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/194993#M6207</link>
      <description>&lt;P&gt;I suppose that you are able to access Leaflet by using&amp;nbsp;this code:&lt;/P&gt;&lt;PRE&gt;const L = window['L'] || window.window['L'];&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Ignat Vilesov&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;Software Engineer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft Power BI Custom Visuals&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:pbicvsupport@microsoft.com" target="_blank"&gt;pbicvsupport@microsoft.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 15:24:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Does-PBI-Custom-visuals-support-tiles-maps/m-p/194993#M6207</guid>
      <dc:creator>v-viig</dc:creator>
      <dc:date>2017-06-15T15:24:50Z</dc:date>
    </item>
  </channel>
</rss>

