-
Notifications
You must be signed in to change notification settings - Fork 46
/
test-google_dependencies.R
91 lines (57 loc) · 2.34 KB
/
test-google_dependencies.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
context("dependencies")
test_that("dependencies load", {
## CIRCLES
m <- google_map(key = "abc", data = tram_stops) %>%
add_circles()
expect_true("circles" %in% sapply(m$dependencies, function(x) x[['name']]))
## DRAGDROP
m <- google_map(key = "abc") %>%
add_dragdrop()
expect_true("geojson" %in% sapply(m$dependencies, function(x) x[['name']]))
## DRAWING
m <- google_map(key = "abc", data = tram_stops) %>%
add_drawing()
expect_true("drawing" %in% sapply(m$dependencies, function(x) x[['name']]))
## FUSION
## DRAGDROP
m <- google_map(key = "abc") %>%
add_fusion(query = "{}")
expect_true("fusion" %in% sapply(m$dependencies, function(x) x[['name']]))
## GEOJSON
m <- google_map(key = "abc") %>%
add_geojson(data = geo_melbourne)
expect_true("geojson" %in% sapply(m$dependencies, function(x) x[['name']]))
## HEATMAP
## DRAGDROP
m <- google_map(key = "abc", data = tram_stops) %>%
add_heatmap()
expect_true("heatmap" %in% sapply(m$dependencies, function(x) x[['name']]))
## KML
m <- google_map(key = "abc") %>%
add_kml(kml_url = "http://www.symbolix.com.au")
expect_true("kml" %in% sapply(m$dependencies, function(x) x[['name']]))
## MARKERS
m <- google_map(key = "abc", data = tram_stops) %>%
add_markers()
expect_true("markers" %in% sapply(m$dependencies, function(x) x[['name']]))
## MARKERCLUSTERER
m <- google_map(key = "abc", data = tram_stops) %>%
add_markers()
expect_true("markers" %in% sapply(m$dependencies, function(x) x[['name']]))
## OVERLAY
m <- google_map(key = "abc", data = tram_stops) %>%
add_overlay(north = 0, east = 0, south = 0, west = 0, overlay_url = "http://www.symbolix.com.au")
expect_true("overlay" %in% sapply(m$dependencies, function(x) x[['name']]))
## POLYONS
m <- google_map(key = "abc") %>%
add_polygons(data = melbourne, polyline = "polyline")
expect_true("polygons" %in% sapply(m$dependencies, function(x) x[['name']]))
## POLYLINES
m <- google_map(key = "abc", data = tram_route) %>%
add_polylines(lat = "shape_pt_lat", lon = "shape_pt_lon")
expect_true("polylines" %in% sapply(m$dependencies, function(x) x[['name']]))
## RECTANGLES
m <- google_map(key = "abc", data = tram_stops) %>%
add_rectangles()
expect_true("rectangles" %in% sapply(m$dependencies, function(x) x[['name']]))
})