BaşlayınÜcretsiz Başlayın

Circle Markers

Circle markers are notably different from pin markers:

  • We can control their size
  • They do not "stand-up" on the map
  • We can more easily change their color

There are many ways to customize circle markers and the design of your leaflet map. To get started we will focus on the following arguments.

addCircleMarkers(map, lng = NULL, lat = NULL, 
                 radius = 10, color = "#03F", popup = NULL)

The first argument map takes a leaflet object, which we will pipe directly into addCircleMarkers(). lng and lat are the coordinates we are mapping. The other arguments can customize the appearance and information presented by each marker.

The ca data frame and the leaflet object map have been loaded for you.

Bu egzersiz

Interactive Maps with leaflet in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Clear the markers from the map 
map2 <- map %>% 
            ___
Kodu Düzenle ve Çalıştır