Problem
I have a data.frame that contains a column, named "icon", with a link in character format exactly like so "https://i.stack.imgur.com/kDNdX.png".
I am feeding the column name into the google_map_update call in my shiny app:
output$map <- renderGoogle_map({ google_map( location = c(43.761539, -79.411079), key = api_key, scale_control = F, street_view_control = F ) }) observeEvent( input$updateData, # a button that updates the data { googleway::google_map_update(map_id = "map") %>% clear_markers() %>% googleway::add_markers( lat = "lat.x", lon = "long.x", marker_icon = "icon", data = data %>% filter(gender %in% input$gender) } ) )
However, when I plot the points, nothing shows. Looking at the Chrome console, I see error 404, url not found error. I can still see the clustered points (the yellow, red and blue signals with a number), but not the individual markers.
I tried the following
- Not including the s in https://
- Referring to a local file instead, calling it in 2 ways: absolute and relative
- Using an entirely different link that other sites use (http://maps.google.com/mapfiles/kml/shapes/parking_lot_maps.png)
- Looking at SO, but most google map marker question are in Javascript
- When using it non-shiny, the custom markers work:
google_map( location = c(43.761539, -79.411079), ) %>% googleway::add_markers( data = data, marker_icon = "icon", lat = "lat.x", lon = "long.x", cluster = T )