Openlayers中的旋转标记(图标)3 [英] Rotating marker (icon) in openlayers 3
本文介绍了Openlayers中的旋转标记(图标)3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在项目中使用openlayers 3.我创建了一个自定义标记(图标),并且需要旋转标记角度.
I m using openlayers 3 in my project. I created a custom marker (icon) and i need to rotate marker with angle.
有人曾尝试过吗?这是我的代码的关键部分,我无法弄清楚.
Is anybody tried this before? It is a critical part of my code and i couldnt figure it out.
注意:不是地图.只是标记.
Note: Not the map. just marker.
推荐答案
Set up an overlay like in the icon example and apply CSS rotation to it (ie. transform: rotate(120deg);
, add browser prefixed versions as needed). If you need this to be dynamic, adjust the property through JavaScript.
这篇关于Openlayers中的旋转标记(图标)3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文