Or if you prefer plotly: world.map <- maps::map("world", plot = FALSE, fill = TRUE) p <- sf:: st_as_sf(world.map, coords = c('x', 'y')) plotly::ggplotly( ggplot2::ggplot(data = p) + ggplot2::geom_sf() )
> On Mar 6, 2019, at 2:12 PM, Roy Mendelssohn - NOAA Federal > <roy.mendelss...@noaa.gov> wrote: > > world.map <- maps::map("world", plot = FALSE, fill = TRUE) > p <- sf:: st_as_sf(world.map, coords = c('x', 'y')) > map view::map view(p) > > > HTH, > > -Roy >> On Mar 6, 2019, at 2:10 PM, rmendelss gmail <rmende...@gmail.com> wrote: >> >> world.map <- maps::map("world", plot = FALSE, fill = TRUE) >> p <- sf:: st_as_sf(world.map, coords = c('x', 'y')) >> map view::map view(p) >> >> HTH, >> >> -Roy >> >>> On Mar 6, 2019, at 1:44 PM, reichm...@sbcglobal.net wrote: >>> >>> R Help >>> >>> Anyone know if I can add a zoom In/Out function to the maps available via >>> the "maps" library? Or do I need to use a different mapping library? >>> >>> world.map <- map_data("world") >>> >>> ggplot(data = world.map) + >>> geom_polygon(mapping = aes(x=long, y=lat, group=group)) >>> >>> Jeff >>> >>> ______________________________________________ >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >>> https://stat.ethz.ch/mailman/listinfo/r-help >>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >>> and provide commented, minimal, self-contained, reproducible code. >> > > ********************** > "The contents of this message do not reflect any position of the U.S. > Government or NOAA." > ********************** > Roy Mendelssohn > Supervisory Operations Research Analyst > NOAA/NMFS > Environmental Research Division > Southwest Fisheries Science Center > ***Note new street address*** > 110 McAllister Way > Santa Cruz, CA 95060 > Phone: (831)-420-3666 > Fax: (831) 420-3980 > e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ > > "Old age and treachery will overcome youth and skill." > "From those who have been given much, much will be expected" > "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. > ********************** "The contents of this message do not reflect any position of the U.S. Government or NOAA." ********************** Roy Mendelssohn Supervisory Operations Research Analyst NOAA/NMFS Environmental Research Division Southwest Fisheries Science Center ***Note new street address*** 110 McAllister Way Santa Cruz, CA 95060 Phone: (831)-420-3666 Fax: (831) 420-3980 e-mail: roy.mendelss...@noaa.gov www: http://www.pfeg.noaa.gov/ "Old age and treachery will overcome youth and skill." "From those who have been given much, much will be expected" "the arc of the moral universe is long, but it bends toward justice" -MLK Jr. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.