Skip to content

Commit 8f986a8

Browse files
committed
Update docs
1 parent f8bd469 commit 8f986a8

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

docs/choropleths.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ <h2>Choropleths</h2>
11381138
<h3>Data source</h3>
11391139
<p>We’ll start by loading the data from JSON. While the Leaflet.js example loads the JSON directly into JavaScript, with the Leaflet R package we instead want to load the data into R.</p>
11401140
<p>In this case, we’ll use the <code>geojsonio</code> package to load the data into <code>sp</code> objects, which will let us easily manipulate the geographic features, and their properties, in R.</p>
1141-
<pre class="r"><code>states &lt;- geojsonio::geojson_read(system.file(&quot;json/us-states.geojson&quot;, package=&quot;leaflet&quot;), what = &quot;sp&quot;)
1141+
<pre class="r"><code>states &lt;- geojsonio::geojson_read(&quot;https://rstudio.github.io/leaflet/json/us-states.geojson&quot;, what = &quot;sp&quot;)
11421142
class(states)</code></pre>
11431143
<pre><code>## [1] &quot;SpatialPolygonsDataFrame&quot;
11441144
## attr(,&quot;package&quot;)
@@ -5394,7 +5394,7 @@ <h3>Legend</h3>
53945394
<div id="complete-code" class="section level3">
53955395
<h3>Complete code</h3>
53965396
<pre class="r"><code># From http://leafletjs.com/examples/choropleth/us-states.js
5397-
states &lt;- geojsonio::geojson_read(system.file(&quot;json/us-states.geojson&quot;, package=&quot;leaflet&quot;), what = &quot;sp&quot;)
5397+
states &lt;- geojsonio::geojson_read(&quot;https://rstudio.github.io/leaflet/json/us-states.geojson&quot;, what = &quot;sp&quot;)
53985398

53995399
bins &lt;- c(0, 10, 20, 50, 100, 200, 500, 1000, Inf)
54005400
pal &lt;- colorBin(&quot;YlOrRd&quot;, domain = states$density, bins = bins)

docs/colors.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h3>Coloring continuous data</h3>
268268
<pre class="r"><code>library(rgdal)
269269

270270
# From http://data.okfn.org/data/datasets/geo-boundaries-world-110m
271-
countries &lt;- readOGR(system.file(&quot;json/countries.geojson&quot;, package=&quot;leaflet&quot;))
271+
countries &lt;- readOGR(&quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;)
272272
map &lt;- leaflet(countries)</code></pre>
273273
<p>We’ve loaded some shape data for countries, including a numeric field <code>gdp_md_est</code> which contains GDP estimates.</p>
274274
<pre class="r"><code>par(mar = c(5,5,0,0), cex = 0.8)

docs/json.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ <h3>Reading as <code>sp</code></h3>
250250
<p>The first approach is to use either <code>rgdal</code> or <code>geojsonio</code> (packages) to read GeoJSON/TopoJSON as <code>sp</code> objects. Then, you can use the full functionality of <a href="shapes.html">polygons</a>, <a href="markers.html">markers</a>, <a href="colors.html">colors</a>, <a href="legends.html">legends</a>, etc.</p>
251251
<pre class="r"><code># From http://eric.clst.org/Stuff/USGeoJSON and
252252
# https://en.wikipedia.org/wiki/List_of_United_States_counties_and_county_equivalents
253-
nycounties &lt;- rgdal::readOGR(system.file(&quot;json/nycounties.geojson&quot;, package=&quot;leaflet&quot;)) </code></pre>
253+
nycounties &lt;- rgdal::readOGR(&quot;https://rstudio.github.io/leaflet/json/nycounties.geojson&quot;) </code></pre>
254254
<pre><code>## OGR data source with driver: GeoJSON
255-
## Source: &quot;/Library/Frameworks/R.framework/Versions/4.0/Resources/library/leaflet/json/nycounties.geojson&quot;, layer: &quot;nycounties&quot;
255+
## Source: &quot;https://rstudio.github.io/leaflet/json/nycounties.geojson&quot;, layer: &quot;nycounties&quot;
256256
## with 62 features
257257
## It has 4 fields</code></pre>
258258
<pre class="r"><code># Or use the geojsonio equivalent:
259-
# nycounties &lt;- geojsonio::geojson_read(system.file(&quot;json/nycounties.geojson&quot;, package=&quot;leaflet&quot;), what = &quot;sp&quot;)
259+
# nycounties &lt;- geojsonio::geojson_read(&quot;https://rstudio.github.io/leaflet/json/nycounties.geojson&quot;, what = &quot;sp&quot;)
260260

261261
pal &lt;- colorNumeric(&quot;viridis&quot;, NULL)
262262

@@ -917,7 +917,7 @@ <h3>Working with raw GeoJSON/TopoJSON</h3>
917917
<p>The <code>addGeoJSON()</code> and <code>addTopoJSON()</code> functions accept GeoJSON data in either parsed (nested lists) or stringified (single-element character vector) format.</p>
918918
<p>Note that for larger JSON data, using parsed is significantly slower than using stringified, because parsed data must go through a JSON encoding step.</p>
919919
<p>A simple example using stringified data:</p>
920-
<pre class="r"><code>topoData &lt;- readLines(system.file(&quot;json/us-10m.json&quot;, package=&quot;leaflet&quot;)) %&gt;% paste(collapse = &quot;\n&quot;)
920+
<pre class="r"><code>topoData &lt;- readLines(&quot;https://rstudio.github.io/leaflet/json/us-10m.json&quot;) %&gt;% paste(collapse = &quot;\n&quot;)
921921

922922
leaflet() %&gt;% setView(lng = -98.583, lat = 39.833, zoom = 3) %&gt;%
923923
addTiles() %&gt;%
@@ -1001,7 +1001,7 @@ <h4>Styling raw GeoJSON/TopoJSON</h4>
10011001
<pre class="r"><code>library(jsonlite)
10021002

10031003
# From http://data.okfn.org/data/datasets/geo-boundaries-world-110m
1004-
geojson &lt;- readLines(system.file(&quot;json/countries.geojson&quot;, package=&quot;leaflet&quot;), warn = FALSE) %&gt;%
1004+
geojson &lt;- readLines(&quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;, warn = FALSE) %&gt;%
10051005
paste(collapse = &quot;\n&quot;) %&gt;%
10061006
fromJSON(simplifyVector = FALSE)
10071007

docs/legends.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ <h2>Legends</h2>
263263
## use options(&quot;rgdal_show_exportToProj4_warnings&quot;=&quot;none&quot;) before loading sp or rgdal.
264264
## Overwritten PROJ_LIB was /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rgdal/proj</code></pre>
265265
<pre class="r"><code># From http://data.okfn.org/data/datasets/geo-boundaries-world-110m
266-
countries &lt;- readOGR(system.file(&quot;json/countries.geojson&quot;, package=&quot;leaflet&quot;))</code></pre>
266+
countries &lt;- readOGR(&quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;)</code></pre>
267267
<pre><code>## OGR data source with driver: GeoJSON
268-
## Source: &quot;/Library/Frameworks/R.framework/Versions/4.0/Resources/library/leaflet/json/countries.geojson&quot;, layer: &quot;countries&quot;
268+
## Source: &quot;https://rstudio.github.io/leaflet/json/countries.geojson&quot;, layer: &quot;countries&quot;
269269
## with 177 features
270270
## It has 2 fields</code></pre>
271271
<pre class="r"><code>map &lt;- leaflet(countries) %&gt;% addTiles()</code></pre>

docs/libs/leaflet-binding/leaflet.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ _leaflet2["default"].TileLayer.WMS.prototype.initialize = function (urlTemplate,
454454

455455

456456
},{"./global/leaflet":10}],8:[function(require,module,exports){
457-
(function (global){
457+
(function (global){(function (){
458458
"use strict";
459459

460460
Object.defineProperty(exports, "__esModule", {
@@ -463,9 +463,9 @@ Object.defineProperty(exports, "__esModule", {
463463
exports["default"] = global.HTMLWidgets;
464464

465465

466-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
466+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
467467
},{}],9:[function(require,module,exports){
468-
(function (global){
468+
(function (global){(function (){
469469
"use strict";
470470

471471
Object.defineProperty(exports, "__esModule", {
@@ -474,9 +474,9 @@ Object.defineProperty(exports, "__esModule", {
474474
exports["default"] = global.jQuery;
475475

476476

477-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
477+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
478478
},{}],10:[function(require,module,exports){
479-
(function (global){
479+
(function (global){(function (){
480480
"use strict";
481481

482482
Object.defineProperty(exports, "__esModule", {
@@ -485,9 +485,9 @@ Object.defineProperty(exports, "__esModule", {
485485
exports["default"] = global.L;
486486

487487

488-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
488+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
489489
},{}],11:[function(require,module,exports){
490-
(function (global){
490+
(function (global){(function (){
491491
"use strict";
492492

493493
Object.defineProperty(exports, "__esModule", {
@@ -496,9 +496,9 @@ Object.defineProperty(exports, "__esModule", {
496496
exports["default"] = global.L.Proj;
497497

498498

499-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
499+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
500500
},{}],12:[function(require,module,exports){
501-
(function (global){
501+
(function (global){(function (){
502502
"use strict";
503503

504504
Object.defineProperty(exports, "__esModule", {
@@ -507,7 +507,7 @@ Object.defineProperty(exports, "__esModule", {
507507
exports["default"] = global.Shiny;
508508

509509

510-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
510+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
511511
},{}],13:[function(require,module,exports){
512512
"use strict";
513513

@@ -868,7 +868,7 @@ if (_htmlwidgets2["default"].shinyMode) {
868868

869869

870870
},{"./cluster-layer-store":1,"./control-store":2,"./crs_utils":3,"./dataframe":4,"./fixup-default-icon":5,"./fixup-default-tooltip":6,"./fixup-url-protocol":7,"./global/htmlwidgets":8,"./global/jquery":9,"./global/leaflet":10,"./global/shiny":12,"./layer-manager":14,"./methods":15,"./util":17}],14:[function(require,module,exports){
871-
(function (global){
871+
(function (global){(function (){
872872
"use strict";
873873

874874
Object.defineProperty(exports, "__esModule", {
@@ -1325,9 +1325,9 @@ var LayerManager = /*#__PURE__*/function () {
13251325
exports["default"] = LayerManager;
13261326

13271327

1328-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
1328+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
13291329
},{"./global/jquery":9,"./global/leaflet":10,"./util":17}],15:[function(require,module,exports){
1330-
(function (global){
1330+
(function (global){(function (){
13311331
"use strict";
13321332

13331333
Object.defineProperty(exports, "__esModule", {
@@ -2646,7 +2646,7 @@ methods.createMapPane = function (name, zIndex) {
26462646
};
26472647

26482648

2649-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2649+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
26502650
},{"./cluster-layer-store":1,"./crs_utils":3,"./dataframe":4,"./global/htmlwidgets":8,"./global/jquery":9,"./global/leaflet":10,"./global/shiny":12,"./mipmapper":16,"./util":17}],16:[function(require,module,exports){
26512651
"use strict";
26522652

0 commit comments

Comments
 (0)