Forum Discussion

kal-tahrawi's avatar
kal-tahrawi
Frequent Visitor
8 years ago
Solved

Power bi custom visual and leaflet library

I cloned power bi and leaflet project from GitHub and the following is the project link: https://github.com/woodbuffalo/powerbi-leaflet   powerbi-leaflet/pbiviz.json   { "visual": { ...
  • v-chuncz-msft's avatar
    8 years ago

    kal-tahrawi,

     

    This API version is deprecated. Try to create a new visual project to use the new api.

  • v-viig's avatar
    v-viig
    8 years ago

    You might workaround this error by including these lines into a new file and including this file into externalJS property of pbiviz.json (please note that this file should be specified before leaflet):

    window.devicePixelRatio = Object.defineProperty(window, "devicePixelRatio", {
        get: function() {
            return window.window.devicePixelRatio;
        },
        enumerable: true,
    });
    
    
    window.outerWidth = Object.defineProperty(window, "outerWidth", {
        get: function() {
            return window.window.outerWidth;
        }
    });
    
    window.outerHeight = Object.defineProperty(window, "outerHeight", {
        get: function() {
            return window.window.outerHeight;
        }
    });

    Please let us know if you have any extra questions.

     

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]