Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

[Leaflet] Power BI custom visual - Script keep loading and is not working

Hello everyone,

 

It's my first post to this forum, I hope I will find some help.

I am a beginner using R and Power Bi but my goal is to be able scripting on leaflet maps using R in Power Bi.

 

Here is a link to my actual folder  (I don't know if i provide enough informations here so .. )

 

Here is my script.r file : 

source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
install.packages("tidyverse")

####################################################

################### Actual code ####################
library(leaflet)
library(plotly)
library(tidyverse)
library(ggplot2)
library(htmlwidgets)
library(XML)
library(sp)
library(maps)


m <- leaflet() %>%
  addTiles() %>%  # Add default OpenStreetMap map tiles
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m  # Print the map

####################################################

############# Create and save widget ###############
p = ggplotly(g);
internalSaveWidget(p, 'out.html');
####################################################

I would like to get it working like the first example from this website

 

And this is what I get  , it keeps loading for 5 minutes then a message that says that the script stop loading after 5 minutes.

 

 

(the arrow is supposed to show the loading circle)

 

Thanks for your help ! 

 

Have a nice day

10 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Okay, I will try this ! 

       

      Thank you very much :smileyhappy:

      • RyanBentham's avatar
        RyanBentham
        Kudo Kingpin

        Anonymous   Did you get any joy using leaflet in PowerBI?

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi jamesdales RyanBentham  @Anomimous,

    Have you got a workaround to this issue? Having the same issue here trying to create a viz with leaflet and some polygons. It freezes loading the viz and stops after 5 min. 

    I can't find the solution mentioned by @Anomimous. Do you have a suggestion on how to solve this?

    Thanks

    Regards

    Nicolas