mattbk / hack-grand-forks

Scripts for hacking with public data in the Grand Forks, ND area.
0 stars 1 forks source link

Include a tiny map #13

Open mattbk opened 5 years ago

mattbk commented 5 years ago

This type of thing is an option, but it ought to be a bit easier than that.

mattbk commented 5 years ago

I think Leaflet could be used.

https://rstudio.github.io/leaflet/basemaps.html

image

mattbk commented 5 years ago

Geocode: https://www.r-bloggers.com/introducing-the-nominatim-geocoding-package/ Never mind, lat/long come back with the request.

mattbk commented 5 years ago
library(leaflet)
library(mapview)
#16 might be good for GFK
m <- leaflet(width = 400, height = 400) %>% setView(lng = -97.03756, lat = 47.91359, zoom = 13)
m <- m %>% addTiles() %>% addMarkers(lng = -97.03756, lat = 47.91359)
mapshot(m, file="map.png", vwidth = 200, vheight = 200)

Need to get the scaling right, though. Smaller image, bigger zoom for thumbnail.

mattbk commented 5 years ago

out