var myIconInfo = new BMap.Icon("../static/img/grey.png", new BMap.Size(80, 80), {
anchor: new BMap.Size(25, 42)
});
anchor设置的是定位点距离图片左上角的偏移量。如果设置anchor参数的话,API会自动获取图片中心点作为anchor位置。
var myIconInfo = new BMap.Icon("../static/img/grey.png", new BMap.Size(80, 80), {
anchor: new BMap.Size(25, 42)
});
anchor设置的是定位点距离图片左上角的偏移量。如果设置anchor参数的话,API会自动获取图片中心点作为anchor位置。