cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simP37 Frequent Visitor
Frequent Visitor

[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.

 

Pbiprob.JPG

 

(the arrow is supposed to show the loading circle)

 

Thanks for your help ! 

 

Have a nice day

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-viig
Moderator

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

We suggest to send email to R-script support: Power BI R Custom Visuals Support <pbircvsupport@microsoft.com>

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

8 REPLIES 8
Moderator v-viig
Moderator

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

We suggest to send email to R-script support: Power BI R Custom Visuals Support <pbircvsupport@microsoft.com>

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

View solution in original post

simP37 Frequent Visitor
Frequent Visitor

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

Okay, I will try this ! 

 

Thank you very much Smiley Happy

RyanBentham Regular Visitor
Regular Visitor

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

@simP37   Did you get any joy using leaflet in PowerBI?

 

simP37 Frequent Visitor
Frequent Visitor

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

@RyanBentham 

 

I finally could get the visual working.

 

Yes, I finally had the possibility to design the map that my company was looking for and that the basics bing power BI features did not meet. 

Here is a GIF of a beta sample previzualisation of my project

 

 

 

RyanBentham Regular Visitor
Regular Visitor

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

Good work!....it's still completely baffling me Smiley LOL

jamesdales
Advisor

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

Nice work!

 

To save you re-inventing the wheel too much, you might also want to check out the Icon Map custom visual. The new version (which hopefully will be out any time now once I hear back from the custom visuals team) should be able to display pins and shaded areas on the same map.

 

It's based on Leaflet too.

 

https://community.powerbi.com/t5/Data-Stories-Gallery/Icon-Map-custom-visual-examples/td-p/789914

https://powerbi.jamesdales.com/how-to-use-icon-map/

 

RyanBentham Regular Visitor
Regular Visitor

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

Hey @jamesdales .  The Icon Map is excellent, really is.  I've been using it quite a bit as at the moment I'm pretty sure it's the only way to get Icons/image URLS binded to data points on a map in PBI.

 

Personally I'm not looking to reinvent the wheel or anything like that but just determined to get some leaflet script showing in PBI.   I'm right in saying that r-script hasn't been used for this and it's all via the d3/leaflet libraries ?

 

Thanks

 

Highlighted
jamesdales
Advisor

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

Cool - just didn't want you having to go to a load of effort if you didn't need to.

 

Yes - Icon Map is all JavaScript and Leaflet. I wouldn't know where to start with R - so good luck 🙂

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 108 members 1,564 guests
Please welcome our newest community members: