EVOLUTION-MANAGER
Edit File: groupOptions.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Set options on layer groups</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for groupOptions {leaflet}"><tr><td>groupOptions {leaflet}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set options on layer groups</h2> <h3>Description</h3> <p>Change options on layer groups. Currently the only option is to control what zoom levels a layer group will be displayed at. The <code>zoomLevels</code> option is not compatible with <a href="addLayersControl.html">layers control</a>; do not both assign a group to zoom levels and use it with <code>addLayersControl</code>. </p> <h3>Usage</h3> <pre> groupOptions(map, group, zoomLevels = NULL) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>map</code></td> <td> <p>the map to modify</p> </td></tr> <tr valign="top"><td><code>group</code></td> <td> <p>character vector of one or more group names to set options on</p> </td></tr> <tr valign="top"><td><code>zoomLevels</code></td> <td> <p>numeric vector of zoom levels at which group(s) should be visible, or <code>TRUE</code> to display at all zoom levels</p> </td></tr> </table> <h3>Examples</h3> <pre> pal <- colorQuantile("YlOrRd", quakes$mag) leaflet() %>% # Basic markers addTiles(group = "basic") %>% addMarkers(data = quakes, group = "basic") %>% # When zoomed in, we'll show circles at the base of each marker whose # radius and color reflect the magnitude addProviderTiles(providers$Stamen.TonerLite, group = "detail") %>% addCircleMarkers(data = quakes, group = "detail", fillOpacity = 0.5, radius = ~mag * 5, color = ~pal(mag), stroke = FALSE) %>% # Set the detail group to only appear when zoomed in groupOptions("detail", zoomLevels = 7:18) </pre> <hr /><div style="text-align: center;">[Package <em>leaflet</em> version 2.0.3 <a href="00Index.html">Index</a>]</div> </body></html>