cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

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

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

 

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
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 59 members 1,212 guests
Please welcome our newest community members: