在我的应用程序中,我使用常规标记。一个标记应该不同。
使用 OL5,如何添加带有特定图标/图像的不同标记?
看着(旧的?)例子我看到了这个?但这将在 OL5 中失败。
const marker = new Feature({
geometry: new Point(fromLonLat([0 + mylongitude, 0 + (mylatitude)]))
});
marker.setStyles(new Style({
image: new Icon(({
crossOrigin: 'anonymous',
src: 'assets/images/guestimate_red_hair.png'
}))
}));
this.vectorLayer.getSource().addFeature(marker);