R/PlotBgMap.R

PlotBgMap <-
function( traj, ... ) {

  # extract the projection from the sp object
  hySplitProj <- CRS(proj4string(traj))
  
  # apply the projection to the background map
  canada <- spTransform(opentraj::worldmap, hySplitProj)
  
  # plot the map
  plot(opentraj::worldmap, border="white", col="lightgrey", ... )
}

Try the opentraj package in your browser

Any scripts or data that you put into this service are public.

opentraj documentation built on May 1, 2019, 8:47 p.m.