Last active
August 29, 2015 14:16
-
-
Save alfcrisci/0a66f5a0f5658aa1230c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
viewwhere<-function(object,zoom = 17){ | |
require(leaflet) | |
if (is.null(object$lon) && is.null(object$lat)) | |
{ stop("Object must be have coordinates lat and lon slot." )}; | |
m = leaflet() %>% addTiles() | |
m = m %>% setView(object$lon, object$lat, zoom = zoom) | |
m %>% addPopups(object$lon,object$lat, paste0('The location of the object is here!')) | |
return(m) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to play.... with leaflet Rstudio package