Not possible to set custom extent with "ext" argument of frames_spatial()
Specifying a custom extent with the "ext" argument of frames_spatial() doesn't result in a modified extent. Here is a reprex:
library(moveVis) library(move) library(raster) library(ggplot2)
data("move_data") move_data <- align_move(move_data, res = 4, unit = "mins")
With default extent (equidistant = TRUE)
frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"), map_service = "osm", map_type = "streets", alpha = 0.5, equidistant=T) length(frames) # number of frames frames[[100]] # display one of the frames; extent is square (good)
With default extent (equidistant = FALSE)
frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"), map_service = "osm", map_type = "streets", alpha = 0.5, equidistant=F) length(frames) # number of frames frames[[100]] # display one of the frames; extent is rectangular (good)
With CUSTOM extent - this doesn't work
extent(move_data) #inspect default extent (ext <- extent(8.1, 9.9, 47.1, 47.9)) #specify and inspect custom extent, note that it's BIGGER than the default original extent frames <- frames_spatial(move_data, path_colours = c("red", "green", "blue"), map_service = "osm", map_type = "streets", map_res = 0.8, ext = ext, equidistant = F) frames[[100]] # display one of the frames; NOTE that the extent hasn't changed, despite calling a different extent
I am also experiencing this issue.