Add sources to dynamic map

overlay_sources(
  myplot,
  lon,
  lat,
  icon_url = NULL,
  icon_width = 20,
  icon_height = 20,
  icon_anchor_x = 10,
  icon_anchor_y = 10
)

Arguments

myplot

dynamic map produced by plot_map() function.

lon, lat

longitude and latitude of sources.

icon_url

what image to use for the icon.

icon_width, icon_height

the width and height of the icon.

icon_anchor_x, icon_anchor_y

the coordinates of the "tip" of the icon (relative to its top left corner, i.e. the top left corner means icon_anchor_x = 0 and icon_anchor_y = 0), and the icon will be aligned so that this point is at the marker's geographical location.

Examples

mysim <- rgeoprofile_file("tutorial1_mysim.rds") source_locations <- mysim$record$true_source plot1 <- plot_map() plot1 <- overlay_sources(myplot = plot1, lon = source_locations$longitude, lat = source_locations$latitude) plot1