Skip to contents

quick way to open a map html widget in local browser (saved as tempfile you can share)

Usage

map2browser(x)

Arguments

x

output of ejam2map() or mapfastej() or mapfast()

Value

launches local browser to show x, but also returns name of tempfile that is the html widget

Examples

pts = testpoints_100
mapfast(pts)
# out = ejamit(pts, radius = 1) out = testoutput_ejamit_100pts_1miles # See in RStudio viewer pane ejam2map(out, launch_browser = FALSE) #> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored
mapfastej(out$results_bysite[c(12,31),])
# \donttest{ # See in local browser instead ejam2map(out) #> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored #> /tmp/RtmpuU15oN/mapfast_2a0053036be4.html
# Open folder where interactive map # .html file is saved, so you can share it: x = ejam2map(out) #> Warning: Data contains 1 rows with either missing or invalid lat/lon values and will be ignored #> /tmp/RtmpuU15oN/mapfast_2a006acd5a60.html fname = map2browser(x) #> Error in map2browser(x): must be in interactive mode in R to view html widget this way # browseURL(normalizePath(dirname(fname))) # to open the temp folder # file.copy(fname, "./map.html") # to copy map file to working directory out <- testoutput_ejscreenapi_plus_5 mapfastej(out) #> Warning: Not all summary index columns found. Using NA values for all summary indexes in map popups.
# }