2016-08-23 24 views
-1

我正在处理邻域地图和我的信息窗口我想要一个包含体育场街景的小格子。我为每个位置创建了一个唯一的https请求,唯一的问题是它打印的是实际的链接,而不是发出请求并显示谷歌地图街景图像。我将有问题的代码下面以及对GitHub的库中的链接,该项目谷歌街景https请求正在输出html链接而不是发送请求

lInfowindow.setContent("<div><h2>" + currentMarker.content.name + "</h2><h3>" + currentMarker.content.address + "</h3><div>" + currentMarker.content.streetViewRequest + "</div></div>"); 

的github仓库:https://github.com/omar-jandali/neighborhood-map

+2

请在问题本身提供[mcve],而不是指向外部网站的链接。 – geocodezip

回答

1

当你想画的图像,你必须使用一个<img/>

lInfowindow.setContent("<div><h2>" + currentMarker.content.name + "</h2><h3>" + 
         currentMarker.content.address + "</h3><div> <img src='" + 
         currentMarker.content.streetViewRequest + "'/> </div></div>");