Methods to plot map data defined in the sp package

# S3 method for SpatialPolygonsDataFrame
l_layer(widget, x,
  asSingleLayer = TRUE, ...)

Arguments

widget

widget widget path as a string or as an object handle

x

an object defined in the class sp

asSingleLayer

If TRUE then prefer a single layer over groups with nested 1-dimensinal layers

...

arguments forwarded to the relative l_layer function

Value

layer id

Details

Note that currently loon does neither support holes and ring directions.

References

Applied Spatial Data Analysis with R by Bivand, Roger S. and Pebesma, Edzer and Gomez-Rubio and Virgilio http://www.springer.com/us/book/9781461476177

See also

Examples

if (requireNamespace("rworldmap", quietly = TRUE)) { world <- rworldmap::getMap(resolution = "coarse") p <- l_plot() lmap <- l_layer(p, world, asSingleLayer=TRUE) l_scaleto_world(p) attr(lmap,'hole') attr(lmap,'NAME') }
#> [1] "Antarctica" "Antarctica" #> [3] "Antarctica" "Antarctica" #> [5] "Antarctica" "Antarctica" #> [7] "Antarctica" "Antarctica" #> [9] "Russia" "Russia" #> [11] "Russia" "Russia" #> [13] "Russia" "Russia" #> [15] "Russia" "Russia" #> [17] "Russia" "Russia" #> [19] "Russia" "Russia" #> [21] "Russia" "Canada" #> [23] "Canada" "Canada" #> [25] "Canada" "Canada" #> [27] "Canada" "Canada" #> [29] "Canada" "Canada" #> [31] "Canada" "Canada" #> [33] "Canada" "Canada" #> [35] "Canada" "Canada" #> [37] "Canada" "Canada" #> [39] "Canada" "Canada" #> [41] "Canada" "Canada" #> [43] "Canada" "Canada" #> [45] "Canada" "Canada" #> [47] "Canada" "Canada" #> [49] "Canada" "Canada" #> [51] "Canada" "United States" #> [53] "United States" "United States" #> [55] "United States" "United States" #> [57] "United States" "United States" #> [59] "United States" "United States" #> [61] "United States" "China" #> [63] "China" "Brazil" #> [65] "Australia" "Australia" #> [67] "Greenland" "Kazakhstan" #> [69] "Argentina" "Argentina" #> [71] "India" "Algeria" #> [73] "Congo (Kinshasa)" "Mongolia" #> [75] "Mexico" "Saudi Arabia" #> [77] "Sudan" "Iran" #> [79] "Libya" "Indonesia" #> [81] "Indonesia" "Indonesia" #> [83] "Indonesia" "Indonesia" #> [85] "Indonesia" "Indonesia" #> [87] "Indonesia" "Indonesia" #> [89] "Indonesia" "Indonesia" #> [91] "Indonesia" "Indonesia" #> [93] "South Africa" "South Africa" #> [95] "Peru" "Chad" #> [97] "Mali" "Angola" #> [99] "Angola" "Niger" #> [101] "Colombia" "Ethiopia" #> [103] "Bolivia" "Mauritania" #> [105] "Norway" "Norway" #> [107] "Norway" "Norway" #> [109] "Egypt" "Chile" #> [111] "Chile" "Turkey" #> [113] "Turkey" "Pakistan" #> [115] "Sweden" "Tanzania" #> [117] "Nigeria" "Venezuela" #> [119] "Ukraine" "Namibia" #> [121] "Mozambique" "France" #> [123] "France" "Finland" #> [125] "Afghanistan" "Zambia" #> [127] "Myanmar" "Morocco" #> [129] "Spain" "Botswana" #> [131] "S. Sudan" "Central African Rep." #> [133] "Madagascar" "Turkmenistan" #> [135] "Uzbekistan" "Kenya" #> [137] "Germany" "Thailand" #> [139] "Iraq" "Japan" #> [141] "Japan" "Japan" #> [143] "Poland" "Somalia" #> [145] "Yemen" "Papua New Guinea" #> [147] "Papua New Guinea" "Papua New Guinea" #> [149] "Papua New Guinea" "Cameroon" #> [151] "Paraguay" "Italy" #> [153] "Italy" "Italy" #> [155] "United Kingdom" "United Kingdom" #> [157] "Zimbabwe" "New Zealand" #> [159] "New Zealand" "Vietnam" #> [161] "Belarus" "Romania" #> [163] "Congo (Brazzaville)" "Malaysia" #> [165] "Malaysia" "Ivory Coast" #> [167] "Oman" "Oman" #> [169] "Philippines" "Philippines" #> [171] "Philippines" "Philippines" #> [173] "Philippines" "Philippines" #> [175] "Philippines" "Burkina Faso" #> [177] "Gabon" "Kyrgyzstan" #> [179] "Iceland" "Ecuador" #> [181] "Uganda" "Ghana" #> [183] "Guinea" "Laos" #> [185] "Syria" "Guyana" #> [187] "Uruguay" "Senegal" #> [189] "Tunisia" "Cambodia" #> [191] "Tajikistan" "Nepal" #> [193] "Greece" "Greece" #> [195] "N. Korea" "Bulgaria" #> [197] "Bangladesh" "Suriname" #> [199] "Hungary" "Nicaragua" #> [201] "Austria" "Czech Rep." #> [203] "Eritrea" "Cuba" #> [205] "S. Korea" "Portugal" #> [207] "Azerbaijan" "Azerbaijan" #> [209] "Benin" "Honduras" #> [211] "Latvia" "Malawi" #> [213] "Guatemala" "Lithuania" #> [215] "Serbia" "W. Sahara" #> [217] "Jordan" "Liberia" #> [219] "Ireland" "Georgia" #> [221] "United Arab Emirates" "French Guiana" #> [223] "Estonia" "Croatia" #> [225] "Sierra Leone" "Panama" #> [227] "Denmark" "Denmark" #> [229] "Slovakia" "Bosnia and Herz." #> [231] "Switzerland" "Sri Lanka" #> [233] "Netherlands" "Togo" #> [235] "Costa Rica" "Dominican Rep." #> [237] "Moldova" "Belgium" #> [239] "Bhutan" "Albania" #> [241] "Taiwan" "Armenia" #> [243] "Guinea Bissau" "Macedonia" #> [245] "Lesotho" "Haiti" #> [247] "Slovenia" "Eq. Guinea" #> [249] "Israel" "Burundi" #> [251] "Falkland Is." "Solomon Is." #> [253] "Solomon Is." "Solomon Is." #> [255] "Solomon Is." "Solomon Is." #> [257] "New Caledonia" "Rwanda" #> [259] "Belize" "Djibouti" #> [261] "El Salvador" "Swaziland" #> [263] "Fiji" "Fiji" #> [265] "Fiji" "Kuwait" #> [267] "Montenegro" "Fr. S. and Antarctic Lands" #> [269] "Bahamas" "Bahamas" #> [271] "Bahamas" "Kosovo" #> [273] "East Timor" "Gambia" #> [275] "Jamaica" "Qatar" #> [277] "Lebanon" "Brunei" #> [279] "Puerto Rico" "Trinidad and Tobago" #> [281] "Vanuatu" "Vanuatu" #> [283] "Cyprus" "S. Geo. and S. Sandw. Is." #> [285] "S. Geo. and S. Sandw. Is." "West Bank" #> [287] "N. Cyprus" "Cape Verde" #> [289] "Cape Verde" "Cape Verde" #> [291] "Cape Verde" "Cape Verde" #> [293] "Cape Verde" "Cape Verde" #> [295] "Cape Verde" "Luxembourg" #> [297] "Samoa" "Samoa" #> [299] "Fr. Polynesia" "Fr. Polynesia" #> [301] "Fr. Polynesia" "Fr. Polynesia" #> [303] "Fr. Polynesia" "Fr. Polynesia" #> [305] "Fr. Polynesia" "Fr. Polynesia" #> [307] "Fr. Polynesia" "Fr. Polynesia" #> [309] "Fr. Polynesia" "Fr. Polynesia" #> [311] "Fr. Polynesia" "Fr. Polynesia" #> [313] "Fr. Polynesia" "Fr. Polynesia" #> [315] "Fr. Polynesia" "Fr. Polynesia" #> [317] "Fr. Polynesia" "Fr. Polynesia" #> [319] "Fr. Polynesia" NA #> [321] "Faroe Is." "Faroe Is." #> [323] "Faroe Is." "Faroe Is." #> [325] "Faroe Is." "Mauritius" #> [327] "Comoros" "Comoros" #> [329] "Comoros" "Aland" #> [331] "Aland" "Aland" #> [333] "Hong Kong" "Hong Kong" #> [335] "Hong Kong" "Sao Tome and Principe" #> [337] "Sao Tome and Principe" "Isle of Man" #> [339] "Kiribati" "Kiribati" #> [341] "Kiribati" "Kiribati" #> [343] "Kiribati" "Kiribati" #> [345] "Kiribati" "Kiribati" #> [347] "Kiribati" "Kiribati" #> [349] "Kiribati" "Kiribati" #> [351] "Kiribati" "Kiribati" #> [353] "Kiribati" "Kiribati" #> [355] "Kiribati" "Kiribati" #> [357] "Kiribati" "Dominica" #> [359] "Heard I. and McDonald Is." "Bahrain" #> [361] "Andorra" "Saint Lucia" #> [363] "Micronesia" "Micronesia" #> [365] "Micronesia" "Micronesia" #> [367] "Micronesia" "Guam" #> [369] "Singapore" "Tonga" #> [371] "Tonga" "Tonga" #> [373] "Antigua and Barb." "Antigua and Barb." #> [375] "Curacao" "Gaza" #> [377] "N. Mariana Is." "N. Mariana Is." #> [379] "N. Mariana Is." "N. Mariana Is." #> [381] "N. Mariana Is." "N. Mariana Is." #> [383] "Barbados" "Turks and Caicos Is." #> [385] "Turks and Caicos Is." "Turks and Caicos Is." #> [387] "Palau" "Palau" #> [389] "Malta" "Malta" #> [391] "U.S. Virgin Is." "U.S. Virgin Is." #> [393] "U.S. Virgin Is." "St. Vin. and Gren." #> [395] "St. Vin. and Gren." "St. Vin. and Gren." #> [397] "Cayman Is." "Cayman Is." #> [399] "Cayman Is." "St. Pierre and Miquelon" #> [401] "St. Pierre and Miquelon" "Grenada" #> [403] "St. Kitts and Nevis" "St. Kitts and Nevis" #> [405] "Marshall Is." "Marshall Is." #> [407] "Marshall Is." "Marshall Is." #> [409] "Marshall Is." "Niue" #> [411] "Liechtenstein" "Jersey" #> [413] "Saint Helena" "Saint Helena" #> [415] "Seychelles" "Aruba" #> [417] "Indian Ocean Ter." "Indian Ocean Ter." #> [419] "Indian Ocean Ter." "British Virgin Is." #> [421] "British Virgin Is." "British Virgin Is." #> [423] "Wallis and Futuna" "Wallis and Futuna" #> [425] "Br. Indian Ocean Ter." "American Samoa" #> [427] "San Marino" "Anguilla" #> [429] "Montserrat" "Bermuda" #> [431] "Guernsey" "Maldives" #> [433] "Maldives" "Cook Is." #> [435] "St. Martin" "Norfolk Island" #> [437] "Sint Maarten" "Pitcairn Is." #> [439] "Nauru" "St. Barthelemy" #> [441] "Macau" "Tuvalu" #> [443] "Tuvalu" "Tuvalu" #> [445] "Tuvalu" "Tuvalu" #> [447] "Tuvalu" "Tuvalu" #> [449] "Tuvalu" "Tuvalu" #> [451] "Monaco" "Ashmore and Cartier Is." #> [453] "Vatican"