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 <rmende...@gmail.com> 
Sent: Wednesday, March 6, 2019 4:11 PM
To: reichm...@sbcglobal.net
Cc: R help Mailing list <r-help@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, 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.

______________________________________________
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.

Reply via email to