RgoogleMaps is R packages with two purposes: It provides an R interface to query the Google server for static maps and also can be used as a background image to overlay plots within R.
Questions tagged [rgooglemaps]
49 questions
2
votes
0 answers
Plotting map facets using R
I am trying to plot lat/long using PlotOnStaticMap function from the RgoogleMaps library in R.
library(RgoogleMaps);library(plotrix);
mydata <- read.csv(file=name,header=T,sep=",")
map1 <- PlotOnStaticMap(lat = mydata1$latitude, lon =…

Vishal R
- 1,279
- 1
- 21
- 27
2
votes
2 answers
How to display google map directions given latitude and longitude information in r
I have with me the latitude and logitude information for few locations. Here is a sample:
lat<-c(17.48693,17.49222,17.51965,17.49359,17.49284,17.47077)
long<-c(78.38945,78.39643,78.37835,78.40079,78.40686,78.35874)
I want to plot these locations in…

areddy
- 373
- 3
- 7
- 18
2
votes
1 answer
Drawing circles with specific radius size in 'RgoogleMaps' package
I am new to the RgoogleMaps package and I am trying to include circles to my map with an exact radius. Here is my current code:
library(RgoogleMaps)
data <- read.csv("test.csv", header = TRUE, sep = ",", quote = "\"",
dec = ".",…

userOnel
- 35
- 5
2
votes
2 answers
RgoogleMaps PlotOnStaticMap not adding points to png fiile
I'm trying to save a map with points overlayed to a png file use RgoogleMaps.
I'm able to successfully create maps and overlay points in a plot device but can't figure out how to get the points written to a png file of my map.
I'm on a Mac OS X Lion…

glynnsc
- 115
- 1
- 2
- 7
2
votes
1 answer
R google maps, adding longer paths
I just started play with RgoogleMaps http://cran.r-project.org/web/packages/RgoogleMaps/RgoogleMaps.pdf and it seems really cool, but it seems like there is a limitation in the GetMaps() path option. It looks like (and I might be wrong) a url is…

csta
- 2,423
- 5
- 26
- 34
1
vote
2 answers
How do you make reference to the next row using R, without looping?
I am playing with RGooglemaps, and have been able to plot lines on a map. I loaded my lats and longs from a csv into a coords object.
I wanted to imply direction using: PlotArrowsOnStaticMap
defined as:
PlotArrowsOnStaticMap(MyMap, lat0, lon0,…

gaijintendo
- 423
- 2
- 14
1
vote
1 answer
R: ggmap: How do I draw lines using only known angles on a ggmap? My geom_spoke method is not working
I am attempting to draw lines in polar coordinates on a ggmap. The general method works fine in ggplot:
library(ggmap)
library(rgdal)
library(ggplot2)
#####################################
## build data frame with triangulation data
t1 <-…

CLRoberts
- 13
- 3
1
vote
0 answers
disable zoom, dragging in gvisMap
Is there a way to entirely disable dragging and/or zooming in gvisMap, and remove the zoom control also? I have looked at options under google.com developers docs referenced in the help for gvisMap(options) but can't see this control.
Broadening…

Gerry
- 113
- 7
1
vote
1 answer
Offline R map with RggogleMap and Leaflet
I'm trying to create an interactive offline map of Canada in R
After doing a bit of searching, RgoogleMaps and Leaflet seems like the best option. I followed the code here: R Leaflet Offline Map Tiles Not Loading
Here is my code:…

jarvsh2929
- 23
- 1
- 4
1
vote
1 answer
How can I over-lay a lat-long grid onto a GetMap (RgoogleMaps) in R?
I retrieved a map to plot points on using the (RgoogleMaps) package
using the following Rcode:
library(RgoogleMaps)
lat = c(-30.3022,-30.5000,-33.48569)
lon = c(153.1189,151.6500,145.5316)
center = c(mean(lat), mean(lon))
zoom <-…

DASmith
- 11
- 1
1
vote
2 answers
Map of India in R with Different Values of Five Indicators for Every State of India
I want to generate a map of India in R. I have five indicators with different values of every state. I want to plot bubbles with five different colors, and their size should represent their intensity in every state. For example:
State A B C …

Pankaj
- 1,296
- 2
- 13
- 23
1
vote
1 answer
Add image plot to RgoogleMaps plot
I'm trying to add an image plot to PlotOnStaticMaps plot (RgoogleMaps) but I failed.
Here's my code:
PlotOnStaticMap(Map, add = FALSE, TrueProj=F, FUN = points) # background plot
image(X,Y,evalmat,col=heat.colors(100, alpha=0.7), add =…

Darko
- 1,448
- 4
- 27
- 44
1
vote
1 answer
RgoogleMaps city by name
Is it possible to list cities by name rather by longitude and latitude to include them on a map using RgoogleMaps?
Instead of qbbox (see example below), I want to provide a list of cities as an argument.
EX 1. bb = qbbox(c(59.95, 59.7, 59.3,…

tesgoe
- 1,012
- 3
- 10
- 19
1
vote
1 answer
RgoogleMaps text not showing
I'm trying to annotate a plot made using the RgoogleMaps package, but the text isn't showing. Here is the code:
library(RgoogleMaps)
library(PBSmapping)
library(maptools)
lat <- c(6,37.5)
lon <- c(67,98)
center = c(mean(lat), mean(lon))
zoom <-…

si_2012
- 649
- 1
- 6
- 11
1
vote
2 answers
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
The 'mow.R' now contains:
library(RgoogleMaps);
png(filename="RgoogleMaps-package_%03d_med.png", width=480, height=480);
MyMap <- GetMap(markers='&40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc',…

Aquarius_Girl
- 21,790
- 65
- 230
- 411