11library(shiny )
22
3- <<<<<<< HEAD
43fetchDB <- function (input ) {
54 north_lat <- input $ map_background $ north
65 south_lat <- input $ map_background $ south
@@ -62,24 +61,6 @@ dbCoordsToLeaflet <- function(df){
6261 X = df $ X ,
6362 Y = df $ Y ,
6463 Label = df $ pop
65- =======
66- server <- function (input , output ) {
67-
68- res <- dbSendQuery(conn , " SELECT * FROM equipment_access LIMIT 100000" )
69- f <- dbFetch(res )
70-
71- leaf <- leaflet() %> %
72- addTiles()
73-
74- observeEvent(input $ map_background_bounds , {
75- fetchDB(input )
76- })
77-
78- data_df_orig <- data.frame (
79- X = f $ X ,
80- Y = f $ Y ,
81- Label = f $ pop
82- >>>>>>> 9cc55e9a43169d65ceef934676ce21c877d692b2
8364 ) %> % distinct()
8465
8566 data_sf_orig <- st_as_sf(
@@ -90,7 +71,6 @@ server <- function(input, output) {
9071
9172 data_sf_4326 <- st_transform(data_sf_orig , 4326 )
9273
93- <<<<<<< HEAD
9474 return (data_sf_4326 )
9575
9676}
@@ -109,8 +89,6 @@ server <- function(input, output) {
10989
11090 data_sf_4326 <- dbCoordsToLeaflet(f )
11191
112- =======
113- >>>>>>> 9cc55e9a43169d65ceef934676ce21c877d692b2
11492 for (elt2 in seq_len(nrow(data_sf_4326 ))){
11593 elt <- data_sf_4326 [elt2 , ]
11694
@@ -134,11 +112,7 @@ server <- function(input, output) {
134112 }
135113
136114
137- <<<<<<< HEAD
138115 print(" Server update done!" )
139- =======
140- print(" DONE" )
141- >>>>>>> 9cc55e9a43169d65ceef934676ce21c877d692b2
142116
143117
144118 output $ map_background <- renderLeaflet({leaf })
0 commit comments