角度谷歌地图:将图像放在信息窗口
Angular google maps: put image in Info window
我使用谷歌地图api angular(https://angular-ui.github.io/angular-google-maps/#/api/windows)来显示带有标记的地图。标记的点有几个段落和一张图片的标签。
段落内容显示正确,但图像显示不正确。它的url是正确的。可以添加图像吗?
某些代码:HTML
<ui-gmap-google-map center='datos.mapa.center' options="datos.mapa.opciones" zoom='datos.mapa.zoom'>
<ui-gmap-marker coords="datos.marker_club.coords"
options="datos.marker_club.options"
idkey="datos.marker_club.id"
click="markerClick" >
<ui-gmap-window show="datos.marker_club.show"
closeClick="markerClose(marker)" >
<div><img class="mapa_escudo" scr="{{datos.escudo}}" width="32" height="32" />{{datos.club}}<br />Sede {{datos.sede}}</div>
</ui-gmap-windows>
</ui-gmap-marker>
</ui-gmap-google-map>
JS-
$scope.datos.club = 'Club';
$scope.datos.sede = 'Sede';
$scope.datos.escudo = 'http://www.server.com/image.png';
uiGmapGoogleMapApi.then(function(maps) { $scope.datos.mapa = { center: { latitude: latitud, longitude: longitud }, zoom: zoom }; $scope.datos.mapa.opciones = { scrollwheel: true }; var icon = "http://maps.google.com/mapfiles/ms/icons/orange-dot.png"; $scope.datos.marker_club = { id: 1, coords: { latitude: latitud, longitude: longitud}, options:{ draggable: false, icon: new google.maps.MarkerImage(icon), }, }; $scope.markerClick = function(marker, eventName, model) { $scope.datos.marker_club.show = !$scope.datos.marker_club.show; }; $scope.markerClose = function(marker) { $scope.datos.marker.show = false; };
很抱歉,在图像的定义中缺少"ng src"!
相关文章:
- 访问布局信息是否也会导致浏览器重排
- 定义完全独立的样式信息
- 使用html2canvas获取基本信息
- JS表单提交"无法使用Chrome数据保护程序加载此页面.尝试重新加载页面.调试信息:POST CISmtuK
- 从信息框调用弹出图像库
- 如何在不传递此信息的情况下查找被调用的元素
- 将谷歌自动完成地址信息放在页面上,而不是表格中
- 如何通过解析类信息来使用jQuery创建类
- 包含数据库中相关信息的开放模态
- 单击按钮即可在浏览器的新选项卡中打开 Sapui5 详细信息页面
- 如何调整信息窗口的大小并点击按钮?+更改信息窗口的内容
- ng在更新$scope后重复不更新信息
- 谷歌地图点击潜水触发信息窗口
- 根据CHECKBOX输入值动态更新DIV信息
- 如何使用ember.js在操作中传递当前上下文中目标旁边的信息
- Jquery on单击“显示信息”
- 将FlowPlayer嵌入谷歌地图信息窗口
- AEM(cq5)使用组件内的信息
- 如何在完整日历中的当天点击时显示活动详细信息
- 使用javascript后台脚本获取Yotutube频道信息