-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tm_markers error in v3 and v4 #913
Comments
Indeed a typo, thx! However this is unrelated to this issue. Could you test Not sure about the v3 error, but this has low priority. |
Yes that returns TRUE but the path returned by system.file is different from the one shown in the error message |
Strange. What is your output of |
tmap::marker_icon()
#> $iconUrl
#> [1] "C:/Users/EndicottS/AppData/Local/Programs/R/R-4.4.1/library/leaflet/htmlwidgets/lib/leaflet/images/marker-icon.png"
#>
#> $iconWidth
#> [1] 25
#>
#> $iconHeight
#> [1] 41
#>
#> $iconAnchorX
#> [1] 12
#>
#> $iconAnchorY
#> [1] 41
#>
#> attr(,"class")
#> [1] "tmap_icons" Created on 2024-08-20 with reprex v2.1.1 I am guessing there is some problem because R is installed locally for me as a user rather that under C. But system.file should handle that so I wonder if there is somewhere that is not using system.file when it should? |
The iconUrl points to a local installation indeed, which is also hosted on your C drive, but not in the general Program Files. What does If tm_shape(metro) +
tm_markers(shape = tmap::marker_icon()) |
Hi, I am following a class in R and I encounter the same issue using
I tested |
@goneau Please update to the v4 development version with https://github.com/r-tmap/tmap?tab=readme-ov-file#development. The bug in v3 is unlikely to be fixed. I get the following map with the map you shared in view mode. |
Using the development version solve the issue. Unfortunately, I now have errors with |
Hi @goneau, thanks for testing. Feel free to open a new issue about that with a reproducible example! tmap v4 is almost ready and it is exactly those kinds of cases we want to cover before releasing to CRAN |
I have been getting an error when using tm_markers with either tmap 3.99 or 3.99.9001
This simple example causes different errors in each version.
With v3 I get:
While with v4 I get:
#> Error: C:/R/library/leaflet/htmlwidgets/lib/leaflet/images/marker-icon.png is neither a valid path nor url
I did a little digging and I wonder if the problem might be here?:
tmap/R/tm_layers_text.R
Line 694 in f916c7e
It looks like
a_dots
is used when I think it ought to beargs_dots
. Not sure if that is the problem here but seems like it might be a typo.The text was updated successfully, but these errors were encountered: