EVOLUTION-MANAGER
Edit File: addMeasure.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: Add a measure control to the map.</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 addMeasure {leaflet}"><tr><td>addMeasure {leaflet}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Add a measure control to the map.</h2> <h3>Description</h3> <p>Add a measure control to the map. </p> <h3>Usage</h3> <pre> addMeasure(map, position = "topright", primaryLengthUnit = "feet", secondaryLengthUnit = NULL, primaryAreaUnit = "acres", secondaryAreaUnit = NULL, activeColor = "#ABE67E", completedColor = "#C8F2BE", popupOptions = list(className = "leaflet-measure-resultpopup", autoPanPadding = c(10, 10)), captureZIndex = 10000, localization = "en", decPoint = ".", thousandsSep = ",") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>map</code></td> <td> <p>a map widget object</p> </td></tr> <tr valign="top"><td><code>position</code></td> <td> <p>standard <a href="http://leafletjs.com/reference-1.3.1.html#control-positions">Leaflet control position options</a>.</p> </td></tr> <tr valign="top"><td><code>primaryLengthUnit, secondaryLengthUnit</code></td> <td> <p>units used to display length results. secondaryLengthUnit is optional. Valid values are <code>"feet"</code>, <code>"meters"</code>, <code>"miles"</code>, and <code>"kilometers"</code>.</p> </td></tr> <tr valign="top"><td><code>primaryAreaUnit, secondaryAreaUnit</code></td> <td> <p>units used to display area results. secondaryAreaUnit is optional. Valid values are <code>"acres"</code>, <code>"hectares"</code>, <code>"sqmeters"</code>, and <code>"sqmiles"</code>.</p> </td></tr> <tr valign="top"><td><code>activeColor</code></td> <td> <p>base color to use for map features rendered while actively performing a measurement. Value should be a color represented as a hexadecimal string.</p> </td></tr> <tr valign="top"><td><code>completedColor</code></td> <td> <p>base color to use for features generated from a completed measurement. Value should be a color represented as a hexadecimal string.</p> </td></tr> <tr valign="top"><td><code>popupOptions</code></td> <td> <p><code>list</code> of options applied to the popup of the resulting measure feature. Properties may be any <a href="http://leafletjs.com/reference-1.3.1.html#popup-option">standard Leaflet popup options</a>.</p> </td></tr> <tr valign="top"><td><code>captureZIndex</code></td> <td> <p>Z-index of the marker used to capture measure clicks. Set this value higher than the z-index of all other map layers to disable click events on other layers while a measurement is active.</p> </td></tr> <tr valign="top"><td><code>localization</code></td> <td> <p>Locale to translate displayed text. Available locales include en (default), cn, de, es, fr, it, nl, pt, pt_BR, pt_PT, ru, and tr</p> </td></tr> <tr valign="top"><td><code>decPoint</code></td> <td> <p>Decimal point used when displaying measurements. If not specified, values are defined by the localization.</p> </td></tr> <tr valign="top"><td><code>thousandsSep</code></td> <td> <p>Thousands separator used when displaying measurements. If not specified, values are defined by the localization.</p> </td></tr> </table> <h3>Value</h3> <p>modified map </p> <h3>Examples</h3> <pre> leaf <- leaflet() %>% addTiles() %>% # central park fitBounds( -73.9, 40.75, -73.95, 40.8 ) %>% addMeasure() leaf # customizing leaf %>% addMeasure( position = "bottomleft", primaryLengthUnit = "meters", primaryAreaUnit = "sqmeters", activeColor = "#3D535D", completedColor = "#7D4479", localization = "de" ) </pre> <hr /><div style="text-align: center;">[Package <em>leaflet</em> version 2.0.3 <a href="00Index.html">Index</a>]</div> </body></html>