Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
6a24867
add support for pmtiles
cboettig Jan 1, 2025
22f86ef
Merge branch 'main' of https://github.com/cboettig/mapgl
cboettig Jan 1, 2025
a644dc4
resolve merge conflict ;-)
cboettig Jan 1, 2025
a370740
:broom:
cboettig Jan 1, 2025
8b8fa98
bump maplibre to v5 with globe support
walkerke Jan 5, 2025
63235ee
implement prototype storymap API
walkerke Jan 6, 2025
110cb6b
Add gh link to DESCRIPTION
olivroy Jan 7, 2025
babd3f9
Add a search bar to website
olivroy Jan 7, 2025
c19db0e
Merge pull request #61 from cboettig/main
walkerke Jan 7, 2025
656d94e
Merge pull request #63 from kmcd39/maplibre_settooltipsandsource
walkerke Jan 7, 2025
91bb644
commit updates after PRs
walkerke Jan 8, 2025
2dbd853
settle on initial story map implementation
walkerke Jan 8, 2025
bac967f
Merge pull request #65 from walkerke/storymaps
walkerke Jan 8, 2025
95d84f5
allow for non-numeric panel widths
walkerke Jan 8, 2025
7df3a26
revert v_align arg
walkerke Jan 8, 2025
8ef7ac2
allow for reactive expressions inside
walkerke Jan 8, 2025
07ccc2d
allow for globe minimap removal in shiny session
walkerke Jan 9, 2025
eed5302
allow for custom CSS to be used to style specific panels
walkerke Jan 9, 2025
6b31b22
bump to GL JS 3.9.2
walkerke Jan 9, 2025
7f03e01
small cleanup
walkerke Jan 10, 2025
79d47b3
revert modification
walkerke Jan 10, 2025
6296c51
change panel to section for custom css
walkerke Jan 10, 2025
3c61f7e
expose threshold parameter in
walkerke Jan 11, 2025
160f0ef
bump date
walkerke Jan 11, 2025
ee2c7db
add story_maplibre and story_leaflet alias functions
walkerke Jan 11, 2025
07f416e
allow for global panel modification - make this easier
walkerke Jan 13, 2025
3535fc2
update story_leaflet and story_maplibre
walkerke Jan 13, 2025
5e16df8
publish story map documentation
walkerke Jan 13, 2025
71c111f
Merge pull request #64 from olivroy/patch-1
walkerke Jan 13, 2025
515089c
passing CRAN checks
walkerke Jan 13, 2025
d55fd67
passing CRAN checks
walkerke Jan 13, 2025
2ce46ab
update docs
walkerke Jan 13, 2025
d813582
update docs
walkerke Jan 13, 2025
a83db60
h3j proof-of-principle
cboettig Jan 28, 2025
99ae20d
namespace
cboettig Jan 30, 2025
a7940fa
document :pen:
cboettig Jan 30, 2025
a921cb0
consistent naming convention :see_no_evil:
cboettig Jan 30, 2025
61fc0a4
:pen: docs
cboettig Jan 30, 2025
86eb4b0
fix problems in story maps with global styles for panels
walkerke Feb 13, 2025
0aeb200
Merge pull request #69 from cboettig/main
walkerke Feb 20, 2025
9f73848
fix #70 by projecting through web mercator first for rasters
walkerke Feb 25, 2025
4fe14f7
Merge pull request #76 from walkerke/raster-fix
walkerke Feb 25, 2025
5c1a682
fix #70
walkerke Feb 25, 2025
d5ab126
fix #56 allowing layers to be linked to legends, allow for legend off…
walkerke Mar 5, 2025
864fef5
Merge pull request #77 from walkerke/legend-groups
walkerke Mar 5, 2025
fbaf9fe
bump date
walkerke Mar 5, 2025
1a6fa40
fix #78
walkerke Mar 6, 2025
f481e9c
batch of updates to layers control
walkerke Mar 7, 2025
3df169a
update control positioning
walkerke Mar 7, 2025
378b3c9
clean up margin a bit more
walkerke Mar 7, 2025
fb5dfee
additional layers control updates
walkerke Mar 7, 2025
e6fbc9e
update date
walkerke Mar 7, 2025
4a9e6ce
Merge pull request #81 from walkerke/update-layers-control
walkerke Mar 7, 2025
793c387
batch of updates to improve the compare functionality
walkerke Mar 11, 2025
940103b
fix proxy implementation for compare plugin
walkerke Mar 12, 2025
00331ec
ensure proxy works for compare in shiny across functions
walkerke Mar 13, 2025
35485e5
move out examples
walkerke Mar 13, 2025
f12b72b
bump date
walkerke Mar 13, 2025
f2c0b7b
layers control and draw control now working in compare; geocoder not …
walkerke Mar 14, 2025
7b78371
fixes to compare implementation for mapbox, pending maplibre
walkerke Mar 14, 2025
568e14b
some progress on maplibre updates
walkerke Mar 14, 2025
f2ab600
roll back maplibregl_compare.js pending manual edits
walkerke Mar 14, 2025
bf0df23
enable scale control in mapbox swipe maps
walkerke Mar 14, 2025
7641da0
punting maplibre controls in compare() as they aren't supported; keep…
walkerke Mar 15, 2025
d3d280e
bump date
walkerke Mar 15, 2025
bfa4608
Merge pull request #83 from walkerke/improve-compare
walkerke Mar 15, 2025
7360bff
update docs
walkerke Mar 15, 2025
18f9fbf
fix controls implementation for maplibre compare
walkerke Mar 17, 2025
7ee76d9
support draw control in maplibre compare
walkerke Mar 17, 2025
5a04a10
update docs to reflect changes
walkerke Mar 17, 2025
24b7fb1
bump version for CRAN release
walkerke Mar 18, 2025
b49fb2f
rebuild docs
walkerke Mar 18, 2025
d9930d1
bump gl js to v3.11.0
walkerke Apr 9, 2025
7f3e004
bump maplibre to 5.3.0
walkerke Apr 9, 2025
0ed96a2
bump date and version
walkerke Apr 9, 2025
61ce17c
support globe control for maplibre maps
walkerke Apr 11, 2025
aa324c8
fix #91
walkerke Apr 14, 2025
cefd307
update docs
walkerke May 3, 2025
d9b85fc
fix bug with markers in compare widget
walkerke May 5, 2025
cb6b710
expose swiper color param for compare widget
walkerke May 5, 2025
4bf7b11
trim map ID for indexing session$input in get_drawn_features
ngoodkind May 6, 2025
be1c1f3
Merge pull request #95 from ngoodkind/get_drawn_features-namespacing
walkerke May 6, 2025
0497a58
bump GL JS to 3.12.0
walkerke May 12, 2025
0e2a12d
bump date
walkerke May 12, 2025
35373a9
fix set style issues for Mapbox and MapLibre shiny apps
walkerke May 14, 2025
bdbe673
fix #39
walkerke May 14, 2025
4291bf4
bump date
walkerke May 14, 2025
f4ee490
Merge pull request #99 from walkerke/fix-set-style
walkerke May 14, 2025
1c43456
support rain and snow effects for Mapbox
walkerke May 15, 2025
3be06ef
PR to fix #96
walkerke May 16, 2025
e6e7354
implement fix for maplibre
walkerke May 16, 2025
e8d9fa4
Merge pull request #101 from walkerke/legend-popup-clear
walkerke May 16, 2025
0afd225
fix #92
walkerke May 16, 2025
5d88b1c
ignore CLAUDE.md
walkerke May 19, 2025
70698a5
add _view() functions
walkerke May 23, 2025
eb026a7
use circular patches for circle layers when categorical
walkerke May 23, 2025
02e86ca
Merge pull request #102 from walkerke/implement-view
walkerke May 23, 2025
7a184d8
update docs
walkerke May 23, 2025
dae72b9
update NEWS in docs
walkerke May 23, 2025
f6a3365
fix typo
walkerke May 23, 2025
baa2d99
add dependency on R >= 4.1.0
walkerke May 23, 2025
1ab70d0
fix problems with pkgdown site
walkerke May 24, 2025
83a2322
first implementation of editable features
walkerke May 26, 2025
8da548f
parameterize styling options for draw control
walkerke May 27, 2025
6679109
bump versions; restore highlighted vertex on click
walkerke May 30, 2025
cc7e3a4
add edit functionality for draw control in compare environment
walkerke May 30, 2025
5395e44
bump date
walkerke Jun 4, 2025
ea582b8
Merge pull request #105 from walkerke/edit-features
walkerke Jun 4, 2025
5652739
update docs
walkerke Jun 4, 2025
65db8e0
clean up hovers for pmtiles, add support for dynamic tooltips
walkerke Jun 4, 2025
c31118b
implement in compare environment
walkerke Jun 4, 2025
db6b4d9
rebuild docs
walkerke Jun 4, 2025
b5e9deb
Merge pull request #106 from walkerke/hover-and-tooltips
walkerke Jun 4, 2025
e72f48a
fix #52
walkerke Jun 5, 2025
2a2fc54
bump date
walkerke Jun 5, 2025
296d654
additional fix for #82
walkerke Jun 5, 2025
6c265d9
+ promoteId for hover effects on 3rd party vector tiles
bbest Jun 6, 2025
f795df7
first implementation of number formatting for tooltips
walkerke Jun 6, 2025
fea176a
new number_format() function
walkerke Jun 6, 2025
4cdd7bb
reorganize function reference in docs
walkerke Jun 7, 2025
cfcbd40
fix #100 allowing for true use of basemap switchers
walkerke Jun 11, 2025
b6978a2
add popups and tooltips to state tracking for set_style
walkerke Jun 11, 2025
fa495a1
resolve popup and tooltip stacking with set_style
walkerke Jun 11, 2025
a6c8453
solve legend reversion issue in set_style()
walkerke Jun 11, 2025
7ed1b16
Merge pull request #107 from bbest/main
walkerke Jun 11, 2025
cb70174
change promoteId to promote_id
walkerke Jun 11, 2025
469c2df
expose source keyword args across functions
walkerke Jun 11, 2025
6735eda
Merge pull request #110 from walkerke/set-style-filter
walkerke Jun 11, 2025
1e222ca
allow users to set config in set_style correctly
walkerke Jun 11, 2025
08fca60
fix config in compare env
walkerke Jun 11, 2025
77ae197
bump date
walkerke Jun 11, 2025
e143933
added _hover and _feature_hover as shiny inputs for maplibre
kmcd39 Jun 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ index.md
logo.png
^pkgdown$
LICENSE.md
CLAUDE.md
.claude
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.RData
.Ruserdata
.DS_Store
CLAUDE.md
15 changes: 10 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: mapgl
Title: Interactive Maps with 'Mapbox GL JS' and 'MapLibre GL JS'
Version: 0.1.4.9000
Date: 2025-01-02
Version: 0.2.2.9000
Date: 2025-06-11
Authors@R:
person(given = "Kyle", family = "Walker", email = "kyle@walker-data.com", role = c("aut", "cre"))
Description: Provides an interface to the 'Mapbox GL JS' (<https://docs.mapbox.com/mapbox-gl-js/guides>)
Expand All @@ -10,10 +10,13 @@ Description: Provides an interface to the 'Mapbox GL JS' (<https://docs.mapbox.c
filled maps, circle maps, 'heatmaps', and three-dimensional graphics; and customize map styles and views. The package
also includes utilities to use 'Mapbox' and 'MapLibre' maps in 'Shiny' web applications.
URL: https://walker-data.com/mapgl/
BugReports: https://github.com/walkerke/mapgl/issues
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Depends:
R (>= 4.1.0)
Imports:
htmlwidgets,
geojsonsf,
Expand All @@ -23,8 +26,10 @@ Imports:
grDevices,
base64enc,
terra,
classInt
Suggests:
classInt,
shiny,
viridisLite
Suggests:
mapboxapi,
usethis
usethis,
leaflet
23 changes: 23 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
export(add_categorical_legend)
export(add_circle_layer)
export(add_continuous_legend)
export(add_control)
export(add_draw_control)
export(add_features_to_draw)
export(add_fill_extrusion_layer)
export(add_fill_layer)
export(add_fullscreen_control)
export(add_geocoder_control)
export(add_geolocate_control)
export(add_globe_control)
export(add_globe_minimap)
export(add_h3j_source)
export(add_heatmap_layer)
export(add_image)
export(add_image_source)
Expand All @@ -35,6 +39,7 @@ export(clear_legend)
export(clear_markers)
export(cluster_options)
export(compare)
export(concat)
export(ease_to)
export(fit_bounds)
export(fly_to)
Expand All @@ -44,27 +49,45 @@ export(interpolate)
export(jump_to)
export(mapbox_style)
export(mapboxgl)
export(mapboxglCompareOutput)
export(mapboxglOutput)
export(mapboxgl_compare_proxy)
export(mapboxgl_proxy)
export(mapboxgl_view)
export(maplibre)
export(maplibreCompareOutput)
export(maplibreOutput)
export(maplibre_compare_proxy)
export(maplibre_proxy)
export(maplibre_view)
export(maptiler_style)
export(match_expr)
export(move_layer)
export(number_format)
export(on_section)
export(renderMapboxgl)
export(renderMapboxglCompare)
export(renderMaplibre)
export(renderMaplibreCompare)
export(set_config_property)
export(set_filter)
export(set_fog)
export(set_layout_property)
export(set_paint_property)
export(set_popup)
export(set_projection)
export(set_rain)
export(set_snow)
export(set_source)
export(set_style)
export(set_terrain)
export(set_tooltip)
export(set_view)
export(step_expr)
export(story_leaflet)
export(story_map)
export(story_maplibre)
export(story_section)
import(base64enc)
import(geojsonsf)
import(grDevices)
Expand Down
44 changes: 44 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,47 @@
# mapgl (development version)

* Enhanced draw control functionality with improved feature editing capabilities:
- Added ability to load existing features from map sources into the draw control for editing either when initializing the draw control or via `add_features_to_draw()`
- Fixed vertex styling to properly highlight selected vertices during editing
- Extended draw control support to compare views, enabling feature editing in side-by-side map comparisons
- Improved compatibility with both Mapbox GL JS and MapLibre GL JS

* Fixed `hover_options` for vector tile sources in MapLibre (#67):
- Added proper source layer handling for vector tiles when using hover effects
- Now works correctly with PMTiles and other vector tile sources that include feature IDs
- Note: Vector tiles must include feature IDs for hover effects to work. GeoJSON sources automatically generate IDs.

* Enhanced tooltip functionality with expression support:
- Tooltips can now use expressions for dynamic content generation
- Use `get_column()` to reference feature properties in tooltips
- Added `concat()` helper function for combining strings and expressions
- Example: `tooltip = concat("<strong>Name:</strong> ", get_column("name"), "<br>Value: ", get_column("value"))`
- Works with both regular tooltips and `set_tooltip()` in Shiny applications

# mapgl 0.2.2

* Added `mapboxgl_view()` and `maplibre_view()` functions for quick visualization of sf objects with automatic geometry detection and column-based styling (#102).
* Added support for rain and snow effects on Mapbox GL maps with `set_rain()` and `set_snow()` functions.
* Added `add_globe_control()` for MapLibre maps, allowing users to toggle between "mercator" and "globe" projections.
* Fixed issue with `set_style()` in Shiny applications for both Mapbox and MapLibre maps (#99).
* Fixed namespacing issue in `get_drawn_features()` for Shiny modules (#95).
* Improved compare functionality with better control support and swiper color customization.

# mapgl 0.2.1

* Improved styling and positioning behavior of the layers control. Users can now customize the appearance of the layers control, and the layers control is collapsed by default with cleaner appearance.
Added ability to link legends to specific layers with the new `layer_id` parameter in `add_legend()`. When a layer is toggled in the layers control, its associated legend will automatically show or hide.
* Added support for custom legend positioning with new margin parameters (`margin_top`, `margin_right`, `margin_bottom`, `margin_left`) that allow fine-grained control over legend placement.
* Fixed layers control toggle button state to correctly reflect the initial visibility of layers, resolving the issue with layers set to `visibility = "none"` showing as active in the control.
* Support for the `compare()` plugin in Shiny applications, with new rendering and proxy functions for comparison apps in Mapbox and MapLibre.
* New `mode` parameter in `compare()` allowing users to choose between `"swipe"` mode with a comparison slider, and `"sync"` mode which displays synchronized maps side-by-side.
* Updates throughout the codebase to allow features to be used in comparison maps via Shiny proxy sessions.

# mapgl 0.2.0

* A new "story map" feature allows users to build interactive story maps. [View the story mapping vignette](https://walker-data.com/mapgl/articles/story-maps.html) for more information.
* Various bug fixes and performance improvements; [visit the package GitHub page for more details](https://github.com/walkerke/mapgl).

# mapgl 0.1.4

* `add_image()` allows you to add your own image to the map's sprite for use as an icon / symbol layer
Expand Down
Loading