Javascript 在plotGoogleMaps中附加视频的可能性
我成功地在谷歌地图上绘制了我的许多数据点 但后来我想做以下事情:Javascript 在plotGoogleMaps中附加视频的可能性,javascript,html,r,google-maps,Javascript,Html,R,Google Maps,我成功地在谷歌地图上绘制了我的许多数据点 但后来我想做以下事情: 将图像作为背景添加到我的绘图仪Google地图标记中 在my plotGooglemap标记的信息窗口中添加嵌入youtube的视频 2号是高优先级,1号如果可能,然后确定。 目前,我得到了一些手动视频嵌入解决方案。 我使用plotGoogleMaps生成html文件的R代码如下: require(plotGoogleMaps) NucData <- read.csv("./locationdata.csv") NucD
require(plotGoogleMaps)
NucData <- read.csv("./locationdata.csv")
NucData$Location <- gsub(",",":", NucData$Location)
NucData$latitude <- as.numeric(levels(NucData$latitude))[as.integer(NucData$latitude)]
NucData$longitude <- as.numeric(levels(NucData$longitude))[as.integer(NucData$longitude)]
coordinates(NucData)<-~longitude+latitude # convert to SPDF
proj4string(NucData) <- CRS('+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ')
myplot<-plotGoogleMaps(NucData,filename='MyMap.html', zcol='location.Name'
, draggableMarker=FALSE, colPalette=c('#FF0000', '#FFA500', '#65ed12'),
)
var infowindow = new google.maps.InfoWindow({ content: "", disableAutoPan:false, maxWidth :320, pixelOffset :null });
google.maps.event.addListener(markersNucData7557[0] ,"click",function(event){
infowindow.setContent('<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h1 id="firstHeading" class="firstHeading">Video in Info Window</h1>'+
'<div id="bodyContent">'+
'<iframe width="300" height="250" src="http://www.youtube.com/embed/uV3R4lCc9YI" frameborder="0" allowfullscreen></iframe>'+
'</div>'+
'</div>');
infowindow.setPosition(event.latLng);
infowindow.open(map,markersNucData7557[0] )});
require(谷歌地图)
NucData查看其他问题查看其他问题
m<-plotGoogleMaps(NucData,filename='MyMap.html', zcol='location.Name'
, draggableMarker=FALSE, colPalette=c('#FF0000', '#FFA500', '#65ed12'),
InfoWindowControl=list(map=map, event="click",position="event.latLng",
disableAutoPan=FALSE, maxWidth=330,
content="('<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h1 id="firstHeading" class="firstHeading">Video in Info Window</h1>'+
'<div id="bodyContent">'+
'<iframe width="300" height="250" src="http://www.youtube.com/embed/uV3R4lCc9YI" frameborder="0" allowfullscreen></iframe>'+
'</div>'+
'</div>')")