本文介绍了OpenStreetMap不显示在RStudio(与R 3.2.1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用的代码



$ $ $ $ $


m< - leaflet()%>%
addTiles()%>%
addMarkers (lng = 174.768,lat = -36.852,popup =R的出生地)
m

一个点出现在屏幕的中间,但没有地图。然后我找到包下载,即osmar,并且包括,即

 库(osmar)

而地图仍然没有显示。如何修复?





更新



我可以在我的网络浏览器上访问openstreetmap.com。启用Javascript。他们提到的某些地方使用 setView 来显示openstreetmap,但是当我尝试时,屏幕现在是空白的,没有弹出的指针$ /

$ $ $ $ $





m< - leaflet()%>%
addTiles()% >%
setView(174.768,lat = -36.852,zoom = 18)
m


解决方案

我在R中运行脚本,网站弹出,并说

还有按钮到允许阻止的内容,但是我仍然无法使用R Studio


打开这些地图

I am using code from here

library(leaflet)

m <- leaflet() %>%
  addTiles() %>%  
  addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
m  

A point appears in the middle of the screen, but no map. Then I found package to download, i.e. osmar, and included that, i.e.

library(osmar)

And map is still not displaying. How to fix?

Update

I am able to access openstreetmap.com on my web browser. Javascript is enabled. Some places they mentioned use setView to display openstreetmap but when I try, the screen is now blank, no pop-up pointer

library(osmar)
library(leaflet)

m <- leaflet() %>%
  addTiles() %>%  
  setView(174.768, lat=-36.852, zoom=18)
m
解决方案

I ran script in R, and website pops up and says

And there is button to Allow blocked content, but I am still unable to open these maps with R Studio

这篇关于OpenStreetMap不显示在RStudio(与R 3.2.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 18:49