Skip to contents

This function allows users to interactively snap points on a map by clicking and dragging markers. It returns a data frame with old and new coordinates, and indicates whether the coordinates were updated.

Usage

snap_points_on_map(coords_df)

Arguments

coords_df

A data frame containing columns lat and lng for latitude and longitude.

Value

A data frame with old and new coordinates and update status.

Examples

if (FALSE) { # \dontrun{
coords <- data.frame(
id = 1:2,
lat = c(48.2082, 44.8176),   # Vienna, Belgrade
lng = c(16.3738, 20.4633))    # Vienna, Belgrade
updated_coords <- snap_points_on_map(coords)
} # }