Skip to content

Commit

Permalink
Remove CycleHireApp-html cross-reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Oct 7, 2024
1 parent d7b4ec0 commit 36af934
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions 09-mapping.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -1012,9 +1012,9 @@ Building on this basic example and knowing where to find help (see `?shiny`), th
The recommended next step is to open the previously mentioned [`CycleHireApp/app.R`](https://github.com/geocompx/geocompr/blob/main/apps/CycleHireApp/app.R) script in an integrated development environment (IDE) of choice, modify it and re-run it repeatedly.
The example contains some of the components of a web mapping application implemented in **shiny** and should 'shine' a light on how they behave.

The `CycleHireApp/app.R` script contains **shiny** functions that go beyond those demonstrated in the simple 'lifeApp' example (Figure \@ref(fig:CycleHireApp-html)).
These include `reactive()` and `observe()` (for creating outputs that respond to the user interface --- see `?reactive`) and `leafletProxy()` (for modifying a `leaflet` object that has already been created).
Such elements are critical to the creation of web mapping applications implemented in **shiny**.
The `CycleHireApp/app.R` script contains **shiny** functions that go beyond those demonstrated in the simple 'lifeApp' example, deployed at [shiny.robinlovelace.net/CycleHireApp](https://shiny.robinlovelace.net/CycleHireApp).
These include `reactive()` and `observe()`, (for creating outputs that respond to the user interface, see `?reactive`) and `leafletProxy()` (for modifying a `leaflet` object that has already been created).
Such elements enable web mapping applications implemented in **shiny** [@lovelace_propensity_2017].
A range of 'events' can be programmed including advanced functionality such as drawing new layers or subsetting data, as described in the shiny section of RStudio's **leaflet** [website](https://rstudio.github.io/leaflet/shiny.html).

```{block2 shinynote, type='rmdnote'}
Expand Down Expand Up @@ -1042,10 +1042,9 @@ This way your prototype web applications should be limited not by technical cons
```{r CycleHireApp-html, echo=FALSE, message=FALSE, fig.cap="CycleHireApp, a simple web mapping application for finding the closest cycle hiring station based on your location and requirement of cycles. Interactive version available online at: r.geocompx.org.",fig.scap="Cycle Hire App, a simple web mapping application.", eval=knitr::is_html_output(), out.width="690"}
if (knitr::is_html_output()){
knitr::include_url("https://shiny.robinlovelace.net/CycleHireApp/")
} else {
knitr::include_graphics("images/09_cycle_hire_app.png")
}
```

## Other mapping packages

**tmap** provides a powerful interface for creating a wide range of static maps (Section \@ref(static-maps)) and also supports interactive maps (Section \@ref(interactive-maps)).
Expand Down

0 comments on commit 36af934

Please sign in to comment.