我正在使用angular-google-maps在地图上显示一些标记。在我的网络应用中,我想显示大约200个标记,编号范围为1-200。他们应该看起来像这样:
现在,在我看来,错误的方式是创建200张带有不同编号的图片,因此我正在考虑先制作一张带有空白的图片,然后再制作一张<div/>
可以将编号插入其中的图片。但是,我完全陷入困境,无法在网络上找到解决方案。
我显示标记的HTML代码如下所示:
<ui-gmap-markers models="selectedCar.checkpoints"
coords="'Location'"
idkey="'Id'"
icon="'Icon'">
</ui-gmap-markers>
您可以在标记选项中设置标签:
options: {
icon:'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png',
labelContent: "NUMBER HERE",
labelClass: "ClusterLabel",
labelAnchor: "30 34"
}
然后你会得到这样的东西
http://angular-ui.github.io/angular-google-maps/#!/api/marker请参阅api-> marker-> options
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句