Skip to content

Commit df4afe4

Browse files
author
symbolixau
committed
CRAN ready
1 parent 704c017 commit df4afe4

File tree

6 files changed

+12
-108
lines changed

6 files changed

+12
-108
lines changed

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Package: googleway
22
Type: Package
33
Title: Accesses Google Maps APIs to Retrieve Data and Plot Maps
4-
Version: 2.5.00006
5-
Date: 2018-02-01
4+
Version: 2.6
5+
Date: 2018-04-29
66
Authors@R: c(
77
person("David", "Cooley", ,"dcooley@symbolix.com.au", role = c("aut", "cre")),
88
person("Paulo", "Barcelos", role = "ctb", comment = "Author of c++ decode_pl"),
99
person("Rstudio", role = "ctb", comment = "Functions written for the Leaflet pacakge")
1010
)
11-
Description: Provides a mechanism to plot a Google Map from R and overlay
12-
it with shapes and markers. Also provides access to Google Maps APIs,
11+
Description: Provides a mechanism to plot a 'Google Map' from 'R' and overlay
12+
it with shapes and markers. Also provides access to 'Google Maps' APIs,
1313
including places, directions, roads, distances, geocoding, elevation and
1414
timezone.
1515
License: GPL-3

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2.5.0 (development)
1+
## Version 2.6.0
22

33
# `clear_bounds()` function to clear the map bounds object
44
* `add_ ()` functions gain `focus_layer` argument to re-centre the map on the layer being plotted

R/scratch.R

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +0,0 @@
1-
2-
3-
## TODO:
4-
## TESTS
5-
## - polylines - works with and without ID, for polyline and lat/lon columns
6-
## - polygons - ditto
7-
8-
9-
## two maps with the same layer_id ?
10-
11-
12-
# library(shiny)
13-
# library(shinydashboard)
14-
# library(googleway)
15-
#
16-
# ui <- dashboardPage(
17-
#
18-
# dashboardHeader(),
19-
# dashboardSidebar(),
20-
# dashboardBody(
21-
# box(width = 6,
22-
# google_mapOutput(outputId = "map")
23-
# ),
24-
# box(width = 6,
25-
# google_mapOutput(outputId = "pano")
26-
# )
27-
# )
28-
# )
29-
#
30-
# server <- function(input, output) {
31-
# set_key(read.dcf("~/Documents/.googleAPI", fields = "GOOGLE_MAP_KEY"))
32-
#
33-
# output$map <- renderGoogle_map({
34-
# google_map(location = c(-37.817386, 144.967463),
35-
# zoom = 14,
36-
# split_view = "pano",
37-
# split_view_options = list(heading = 275, pitch = 20)
38-
# )
39-
# })
40-
# }
41-
#
42-
# shinyApp(ui, server)
43-
44-
45-
#
46-
# flinders <- "dhyeFezxsZnDwAP~@ZfCL|AQDc@eEMu@KDp@jFALMBu@_GKDx@~FMBaAyFKF~@xFMDC?cAwFEBdAxFQDeAuFIB`ArFSD"
47-
# markers <- data.frame(
48-
# lat = c(-37.81821,-37.8181,-37.81801,-37.81793,-37.81808,-37.81816,-37.81825,-37.81837,-37.81850,-37.81838,-37.81829,-37.81819,-37.81837,-37.81846,-37.81852,-37.81863,-37.81875,-37.81865,-37.81858,-37.81852),
49-
# lon = c( 144.9656, 144.966, 144.9664, 144.9667, 144.9668, 144.9664, 144.9661, 144.9657, 144.9657, 144.9662, 144.9665, 144.9669, 144.9669, 144.9666, 144.9663, 144.9658, 144.9658, 144.9663, 144.9666, 144.9670)
50-
# )
51-
#
52-
# ## simulate data every 6/10/60 seconds within the polygons / close to markers?
53-
# m <- as.matrix(googlePolylines::decode(flinders)[[1]])
54-
# m <- rbind(m, m[1,])
55-
# m <- m[,c(2,1)]
56-
# sf_flinders <- sf::st_polygon(x = list(m))
57-
#
58-
# library(shiny)
59-
# library(shinydashboard)
60-
# library(googleway)
61-
#
62-
# ui <- dashboardPage(
63-
# dashboardHeader(),
64-
# dashboardSidebar(),
65-
# dashboardBody(
66-
# google_mapOutput(outputId = "map", height = "800px"),
67-
# actionButton(inputId = "circles", label = "add circles")
68-
# )
69-
# )
70-
#
71-
# server <- function(input, output) {
72-
#
73-
# set_key(read.dcf("~/Documents/.googleAPI", fields = "GOOGLE_MAP_KEY"))
74-
# autoInvalidate <- reactiveTimer(10000)
75-
#
76-
# output$map <- renderGoogle_map({
77-
# google_map()
78-
# })
79-
#
80-
# observe({
81-
# autoInvalidate()
82-
# pts <- sf::st_sf(geometry = sf::st_sample(sf_flinders, 500))
83-
# google_map_update(map_id = "map") %>%
84-
# clear_circles() %>%
85-
# add_circles(pts, radius = 1, stroke_weight = 0, update_map_view = F)
86-
# })
87-
# }
88-
# shinyApp(ui, server)
89-
90-
91-
92-

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Provides a mechanism to access various [Google Maps APIs](https://developers.goo
1212

1313
![Google Maps](./vignettes/img/polygon_legend.png)
1414

15-
## v2.4.0
15+
## v2.6
1616

1717
see [News](https://github.com/SymbolixAU/googleway/blob/master/NEWS.md) for a full list of changes and additions
1818

@@ -29,7 +29,7 @@ For specific examples, see the blog posts for
2929

3030
See the [**vignette**](https://github.com/SymbolixAU/googleway/blob/master/vignettes/googleway-vignette.Rmd) for instructions and examples.
3131

32-
## v2.5.0 (development)
32+
## v2.7.0 (development)
3333

3434

3535

cran-comments.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11

22
## Release summary
33

4-
* Updates v2.2.0 to v2.4.0
5-
* Support for `sf` objects
6-
* Colours & legends
7-
* Added extra Google Map API calls
4+
* Updates v2.4.0 to v2.6.0
5+
# Removed all source / C++ code
86

97

108
## Test Environments
119

12-
* local OS X 10.13.2 (Sierra) install, R 3.4.0
10+
* local OS X 15.6.0 (High Sierra) install, R 3.4.4
1311
* ubuntu 12.04.5 (on travis-ci), R 3.3.0
1412
* win-builder (devel and release)
1513

tests/testthat/test-google_map_layer_sf.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ test_that("sf objects encoded", {
55

66
testthat::skip_on_cran()
77
testthat::skip_on_travis()
8-
9-
library(sf)
8+
testthat::skip_if_not_installed(pkg = "sf")
109

1110
df <- data.frame(myId = c(1,1,1,1,1,1,1,1,2,2,2,2),
1211
lineId = c(1,1,1,1,2,2,2,2,1,1,1,2),
@@ -48,8 +47,8 @@ test_that("correct sf rows are returned", {
4847

4948
testthat::skip_on_cran()
5049
testthat::skip_on_travis()
50+
testthat::skip_if_not_installed(pkg = "sf")
5151

52-
library(sf)
5352
df <- data.frame(myId = c(1,1,1,1,1,1,1,1,2,2,2,2),
5453
lineId = c(1,1,1,1,2,2,2,2,1,1,1,2),
5554
lon = c(-80.190, -66.118, -64.757, -80.190, -70.579, -67.514, -66.668, -70.579, -70, -49, -51, -70),
@@ -75,7 +74,6 @@ test_that("correct sf rows are returned", {
7574
sf::st_sf(geometry = multipoint)
7675
)
7776

78-
7977
expect_true(nrow(googleway:::normaliseSfData(sf, "POLYGON")) == 2)
8078
expect_true(nrow(googleway:::normaliseSfData(sf, "LINE")) == 2)
8179
expect_true(nrow(googleway:::normaliseSfData(sf, "POINT")) == 2)

0 commit comments

Comments
 (0)