All Questions
13
questions
0
votes
1
answer
52
views
Problem with deploying shiny app/leaflet to shinyapps.io
I am trying to deploy a very simple app to Shinyapps.io.
My app is the following, and the structure of the folder is mines_peru/app.R (the file below) and mines_peru/data/clean_active_mines.RDS.
...
0
votes
0
answers
74
views
How to turn off the double-click/zoom behaviour of a leaflet map?
I am building a shiny app that contains a leaflet map object and the following functionality.
Basically, I want to single-click on the map, grab the coordinates of the clicked spot, use sf to filter ...
1
vote
1
answer
169
views
How to prevent a leaflet map from zooming in when a double-click event occurs in R/shiny
I am rendering a map in R/shiny in this output widget leafletOutput("map") in UI.
In server, I am creating the map object using tmap and then in renderLeaflet() I use tmap_leaflet(...
1
vote
1
answer
50
views
How can I change tmap buttons and legend to be behind the footer?
I am making a shiny app with a footer. This footer will have some logos and other info, and it should always appear at the bottom of the screen, even when scrolling up and down. The app is multi-...
0
votes
0
answers
47
views
pkgdown::build_article() fails with large chunk sizes using sf and leaflet, no errors reported when setting quiet=FALSE
pkgdown::build_articles() fails with large chunk sizes
rmarkdown::render() works fine
article fails to render any code or text beyond the failed chunk
no errors are reported with build_article(quiet=...
0
votes
0
answers
35
views
Rmarkdown with leaflet/tmaps fails in pkgdown::build_articles() but renders with rmarkdown::render()
Example rmarkdown file here and datafile here.
Code is quite simple:
linestring <- readRDS(gzcon(url("https://github.com/marine-ecologist/testpkg/raw/main/data/particletracks189.rds")))
&...
1
vote
1
answer
157
views
How do I bring the search circle from leaflet.extras::addSearchOSM() to front of leaflet/tmap map?
I am trying to bring the blue search circle from the addSearchOSM() function from leaflet.extras above a choropleth map made by tmap and converted to leaflet. Does anybody know how to bring the blue ...
0
votes
1
answer
205
views
How to crop a small area from leaflet or tmap?
Could someone show me how to crop this lake from a leaflet or tmap? Code and screenshot below:
library(sf)
library(tmap)
library(tmaptools)
library(leaflet)
test <- tm_basemap(c("Esri....
1
vote
1
answer
969
views
How to highlight selected polygon in interactive map, made in tmap package in R?
For example, I made a simple leaflet based map using tmap package. The result is an html with interactive map, showing some polygons of buildings (find data, code and the map itself here).
I want ...
3
votes
2
answers
812
views
How can I wrap long text strings in tmap HTML polygon popups or fixed widths? Can tmap recognize line breaks?
I am using the tmap package (v. 3.0 and I also tried v. 3.2) in R to make an HTML map. I have a spatial polygon of both numeric and character text fields. In a few of my text fields, I have a list of ...
0
votes
1
answer
471
views
Use clickEvents in shiny with tmap
You can use clickEvents for the tmap package in shiny as in this example for leaflet in shiny.
However, I don't know how to acces the click events. On each click an Id is given, but where is this id ...
0
votes
1
answer
2k
views
Change legend bin size in leaflet
I created a density map but R has chosen bin sizes that are too wide. I want to create my own bin sizes.
https://i.sstatic.net/p49qc.jpg
The image shows bin sizes at a full integer and it does not ...
1
vote
0
answers
108
views
How to add/inject arbitrary Javascript to code that tmap_leaflet() generates?
Using the R's tmap package in "view" mode, here I have R pseudocode that generates an interactive world map, and adds an info-button that shows an alert using javascript.
# this is pseudocode - ...