使用picturemarkersymbol时必须指定width和height,不然会报错
graphic.symbol = new PictureMarkerSymbol({
"url": "images/mapIcons/SheXiangJi-blue.png",
"height": 26,
"width": 22,
"yoffset": 13,
"type": "esriPMS"
});
实际的显示效果,这个图标会变的模糊,查看页面元素会发现这个image被放大了:
由此也造成设置yoffset以后位置不准确。
这个问题如何解决?
1 个回复
yonggis
赞同来自:
var marker = new PictureMarkerSymbol();
marker.setAngle(-360);
marker.setHeight(26);
marker.setWidth(21);
marker.setUrl("http://img3.wikia.nocookie.net/__cb20140427224234/caramelangel714/images/7/72/Location_Icon.png");
观察出来,图片大小没有变。自己测试也是可以的。
要回复问题请先登录或注册