Skip to content

Commit 0016c07

Browse files
committed
Fix broken markers in docs, and squelch a warning
1 parent 8712505 commit 0016c07

File tree

5 files changed

+22
-35
lines changed

5 files changed

+22
-35
lines changed

docs/legends.Rmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ The Leaflet package includes convenience functions for creating color legends. I
99
```{r, include = FALSE}
1010
library(leaflet)
1111
library(magrittr)
12+
13+
# Load rgdal in the include=FALSE block to squelch all of the warnings
14+
library(rgdal)
1215
```
1316

1417
```{r}

docs/legends.html

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -246,25 +246,9 @@ <h2>Legends</h2>
246246
<p>The Leaflet package includes convenience functions for creating color
247247
legends. In this section, we will build on the example from the <a
248248
href="colors.html">Colors</a> page.</p>
249-
<pre class="r"><code>library(rgdal)</code></pre>
250-
<pre><code>## Loading required package: sp</code></pre>
251-
<pre><code>## Please note that rgdal will be retired by the end of 2023,
252-
## plan transition to sf/stars/terra functions using GDAL and PROJ
253-
## at your earliest convenience.
254-
##
255-
## rgdal: version: 1.5-28, (SVN revision 1158)
256-
## Geospatial Data Abstraction Library extensions to R successfully loaded
257-
## Loaded GDAL runtime: GDAL 3.2.3, released 2021/04/27
258-
## Path to GDAL shared files: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgdal/gdal
259-
## GDAL binary built with GEOS: TRUE
260-
## Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
261-
## Path to PROJ shared files: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgdal/proj
262-
## PROJ CDN enabled: FALSE
263-
## Linking to sp version:1.4-6
264-
## To mute warnings of possible GDAL/OSR exportToProj4() degradation,
265-
## use options(&quot;rgdal_show_exportToProj4_warnings&quot;=&quot;none&quot;) before loading sp or rgdal.
266-
## Overwritten PROJ_LIB was /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgdal/proj</code></pre>
267-
<pre class="r"><code># From http://data.okfn.org/data/datasets/geo-boundaries-world-110m
249+
<pre class="r"><code>library(rgdal)
250+
251+
# From http://data.okfn.org/data/datasets/geo-boundaries-world-110m
268252
countries &lt;- readOGR(&quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;)</code></pre>
269253
<pre><code>## OGR data source with driver: GeoJSON
270254
## Source: &quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;, layer: &quot;countries&quot;

docs/markers.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ For the simple case of applying a single icon to a set of markers, use `makeIcon
3838

3939
```{r fig.height=1.75}
4040
greenLeafIcon <- makeIcon(
41-
iconUrl = "https://leafletjs.com/examples/custom-icons/leaf-green.png",
41+
iconUrl = "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png",
4242
iconWidth = 38, iconHeight = 95,
4343
iconAnchorX = 22, iconAnchorY = 94,
44-
shadowUrl = "https://leafletjs.com/examples/custom-icons/leaf-shadow.png",
44+
shadowUrl = "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png",
4545
shadowWidth = 50, shadowHeight = 64,
4646
shadowAnchorX = 4, shadowAnchorY = 62
4747
)
@@ -57,12 +57,12 @@ quakes1 <- quakes[1:10,]
5757
5858
leafIcons <- icons(
5959
iconUrl = ifelse(quakes1$mag < 4.6,
60-
"https://leafletjs.com/examples/custom-icons/leaf-green.png",
61-
"https://leafletjs.com/examples/custom-icons/leaf-red.png"
60+
"https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png",
61+
"https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-red.png"
6262
),
6363
iconWidth = 38, iconHeight = 95,
6464
iconAnchorX = 22, iconAnchorY = 94,
65-
shadowUrl = "https://leafletjs.com/examples/custom-icons/leaf-shadow.png",
65+
shadowUrl = "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png",
6666
shadowWidth = 50, shadowHeight = 64,
6767
shadowAnchorX = 4, shadowAnchorY = 62
6868
)

docs/markers.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,10 @@ <h4>Customizing Marker Icons</h4>
382382
<p>For the simple case of applying a single icon to a set of markers,
383383
use <code>makeIcon()</code>.</p>
384384
<pre class="r"><code>greenLeafIcon &lt;- makeIcon(
385-
iconUrl = &quot;https://leafletjs.com/examples/custom-icons/leaf-green.png&quot;,
385+
iconUrl = &quot;https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png&quot;,
386386
iconWidth = 38, iconHeight = 95,
387387
iconAnchorX = 22, iconAnchorY = 94,
388-
shadowUrl = &quot;https://leafletjs.com/examples/custom-icons/leaf-shadow.png&quot;,
388+
shadowUrl = &quot;https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png&quot;,
389389
shadowWidth = 50, shadowHeight = 64,
390390
shadowAnchorX = 4, shadowAnchorY = 62
391391
)
@@ -435,15 +435,15 @@ <h4>Customizing Marker Icons</h4>
435435
[181.62, 181.03, 184.1, 181.66],
436436
{
437437
"iconUrl": {
438-
"data": "https://leafletjs.com/examples/custom-icons/leaf-green.png",
438+
"data": "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png",
439439
"index": 0
440440
},
441441
"iconWidth": 38,
442442
"iconHeight": 95,
443443
"iconAnchorX": 22,
444444
"iconAnchorY": 94,
445445
"shadowUrl": {
446-
"data": "https://leafletjs.com/examples/custom-icons/leaf-shadow.png",
446+
"data": "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png",
447447
"index": 0
448448
},
449449
"shadowWidth": 50,
@@ -502,12 +502,12 @@ <h4>Customizing Marker Icons</h4>
502502

503503
leafIcons &lt;- icons(
504504
iconUrl = ifelse(quakes1$mag &lt; 4.6,
505-
&quot;https://leafletjs.com/examples/custom-icons/leaf-green.png&quot;,
506-
&quot;https://leafletjs.com/examples/custom-icons/leaf-red.png&quot;
505+
&quot;https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png&quot;,
506+
&quot;https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-red.png&quot;
507507
),
508508
iconWidth = 38, iconHeight = 95,
509509
iconAnchorX = 22, iconAnchorY = 94,
510-
shadowUrl = &quot;https://leafletjs.com/examples/custom-icons/leaf-shadow.png&quot;,
510+
shadowUrl = &quot;https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png&quot;,
511511
shadowWidth = 50, shadowHeight = 64,
512512
shadowAnchorX = 4, shadowAnchorY = 62
513513
)
@@ -557,15 +557,15 @@ <h4>Customizing Marker Icons</h4>
557557
[181.62, 181.03, 184.1, 181.66, 181.96, 184.31, 166.1, 181.93, 181.74, 179.59],
558558
{
559559
"iconUrl": {
560-
"data": ["https://leafletjs.com/examples/custom-icons/leaf-red.png", "https://leafletjs.com/examples/custom-icons/leaf-green.png"],
560+
"data": ["https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-red.png", "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-green.png"],
561561
"index": [0, 1, 0, 1, 1, 1, 0, 1, 0, 1]
562562
},
563563
"iconWidth": 38,
564564
"iconHeight": 95,
565565
"iconAnchorX": 22,
566566
"iconAnchorY": 94,
567567
"shadowUrl": {
568-
"data": "https://leafletjs.com/examples/custom-icons/leaf-shadow.png",
568+
"data": "https://leafletjs.com/SlavaUkraini/examples/custom-icons/leaf-shadow.png",
569569
"index": 0
570570
},
571571
"shadowWidth": 50,

docs/raster.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ <h3>Example</h3>
375375
-87.891
376376
],
377377
[
378-
1.49999999999998,
378+
1.5,
379379
-58.008
380380
]
381381
],
@@ -409,7 +409,7 @@ <h3>Example</h3>
409409
}
410410
],
411411
"limits": {
412-
"lat": [1.49999999999998, 29.5],
412+
"lat": [1.5, 29.5],
413413
"lng": [-87.891, -58.008]
414414
}
415415
},

0 commit comments

Comments
 (0)