如何更改已经创建的marker的iocn图标(google map)
varicon=newGIcon();icon.image="http://labs.google.com/ridefinder/images/mm_20_yellow....
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_yellow.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);
var marker = new GMarker(latlng,icon);//第二个参数为图片
上面已经创建了一个带图标的 marker 我想动态的改变它的iocn 展开
icon.image = "http://labs.google.com/ridefinder/images/mm_20_yellow.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);
var marker = new GMarker(latlng,icon);//第二个参数为图片
上面已经创建了一个带图标的 marker 我想动态的改变它的iocn 展开
展开全部
icon.image = "http://labs.google.com/ridefinder/images/mm_20_yellow.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
改变这里的图判迹片地址就可以喇念神,当然,下面的大掘高并小也要改
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
改变这里的图判迹片地址就可以喇念神,当然,下面的大掘高并小也要改
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询