View Projections.R
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
library(geosphere) | |
library(sp) | |
data("meuse") | |
library(RgoogleMaps) | |
getGeoCode("Frankfurt, Germany") | |
# lat lon | |
#50.110922 8.682127 | |
LA <- c(-118.40, 33.95) |
View QuickTutorial.Rmd
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
--- | |
title: "Quick Tutorial, maps in R" | |
author: "M Loecher" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE, fig.width = 8, fig.height = 8) | |
loadLibs = function(libs="RgoogleMaps"){ |
View OfflineMapTiles.Rmd
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
--- | |
title: "Offline Maps with RgoogleMaps and leaflets" | |
author: "M Loecher" | |
output: | |
html_document: | |
toc: true | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE, message=FALSE, warning=FALSE) |
View decodeUtils.R
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
#borrow from | |
#http://s4rdd.blogspot.de/2012/12/google-maps-api-decoding-polylines-for.html | |
decodeLine <- function(encoded){ | |
require(bitops) | |
vlen <- nchar(encoded) | |
vindex <- 0 |