[R] Zoom In/Out maps library
reichm@@j m@iii@g oii sbcgiob@i@@et
reichm@@j m@iii@g oii sbcgiob@i@@et
Wed Mar 6 23:36:23 CET 2019
Roy
Thank you - that's helpful. Going to have to read up on sf and mapview
library. Those are new ones. Then to add a point feature layer (lat/long)
where would I insert that?
Library(maps)
Library(sf) # simple features
Library(mapview)
world.map <- maps::map("world", plot = FALSE, fill = TRUE)
p <- sf::st_as_sf(world.map, coords = c('x', 'y'))
mapview::mapview(p, legend=FALSE)
-----Original Message-----
From: rmendelss gmail <rmendelss using gmail.com>
Sent: Wednesday, March 6, 2019 4:11 PM
To: reichmanj using sbcglobal.net
Cc: R help Mailing list <r-help using r-project.org>
Subject: Re: [R] Zoom In/Out maps library
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, reichmanj using 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 using 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.
More information about the R-help
mailing list