Skip to content
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

Improve popup.vars error message #817

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Conversation

olivroy
Copy link
Contributor

@olivroy olivroy commented Dec 13, 2023

Example

# before
NLD_prov |> 
	tm_shape() +
	tm_polygons(fill = "pop_25_44", popup.vars = c("pop_45_64", "origin_native2"))
#> Incorrect popup.vars specification.
# Now
NLD_prov |> 
	tm_shape() +
	tm_polygons(fill = "pop_25_44", popup.vars = c("pop_45_64", "origin_native2"))
#> ! `popup.vars` must be one of "code", "name", "population",
#>  "pop_men", "pop_women", "pop_0_14", "pop_15_24", "pop_25_44",
#> "pop_45_64", "pop_65plus", "origin_native", "origin_west", or
#>   "origin_non_west", not "origin_native2".Did you mean "origin_native"?

TODO :

  • fill : currently Incorrect Id
  • legend more precise message
+ v3 code detected: as of tmap v4, the legend should be specified for each visual variable (e.g. with the argument fill.legend = tm_legend() of tm_polygons to control the legend of `fill` for polygons.
- v3 code detected: as of tmap v4, tm_legend should be specified per visual variable (e.g. with the argument fill.legend of tm_polygons

@mtennekes mtennekes merged commit 9863372 into r-tmap:master Jan 11, 2024
5 checks passed
@mtennekes
Copy link
Member

Thx @olivroy

@olivroy olivroy deleted the popup-message branch January 11, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants