Skip to contents

The mapView options control the initial view of the chart, and how projection is set up for raw geoJSON maps (beta as of v9.3).

Usage

hc_mapView(hc, ...)

Arguments

hc

A highchart htmlwidget object.

...

Options defined in https://api.highcharts.com/highmaps/mapView.

Details

To set the view dynamically after chart generation, see mapView.setView.

Examples

highchart(type = "map") |>
  hc_add_series(
    type = "mappoint",
    name = "Cities",
    data = list(
      list(name = "Santiago", lon = -70.67, lat = -33.45),
      list(name = "Valparaíso", lon = -71.62, lat = -33.05)
    )
  ) |>
  hc_mapView(
    projection = list(name = "WebMercator"),
    center = c(-71.1, -33.3),
    zoom = 7
  )