addIcon: Add Icons to a Map or RgoogleMap Plot

View source: R/addIcon.R

addIconR Documentation

Add Icons to a Map or RgoogleMap Plot

Description

Adds an icon to map – an RgoogleMaps map object. The following icons are available:

  • orangeFlame – yellow-orange flame

  • redFlame – orange-red flame

You can use other .png files as icons by passing an absolute path as the icon argument.

Usage

addIcon(icon, longitude, latitude, map = NULL, expansion = 0.1, pos = 0)

Arguments

icon

object to be plotted

longitude

vector of longitudes

latitude

vector of latitudes

map

optional RgoogleMaps map object

expansion

icon expansion factor

pos

position of icon relative to location (0=center, 1=bottom, 2=left, 3=top,4=right)

Note

For RgoogleMaps, the expansion will be ~ 0.1 while for basic plots it may need to be much smaller, perhaps ~ 0.001.

Examples

## Not run: 
library(PWFSLSmoke)

monitor_map(Camp_Fire)

addIcon(
  "orangeFlame",
  longitude = -121.437222,
  latitude = 39.810278,
  expansion = 0.003
)

## End(Not run)

MazamaScience/PWFSLSmoke documentation built on July 3, 2023, 11:03 a.m.