简体   繁体   English

OpenLayers 3:多色点

[英]OpenLayers 3: multi-color points

I found this OpenLayers 3 example as a great basis for my project: http://openlayers.org/en/master/examples/igc.html 我发现此OpenLayers 3示例是我的项目的重要基础: http : //openlayers.org/en/master/examples/igc.html

However, I would like to change one thing and I can't find out how to do it. 但是,我想更改一件事,但找不到解决方法。 When value of the input (under the map) is changed, red points appear on the tracks showing where each aircraft was at that time. 当输入值(在地图下)更改时,航迹上会出现红点,表明当时每架飞机的位置。 I would like to have the red points to be of different colors for each track, so that it is easy to understand who is who. 我希望每个曲目的红点都具有不同的颜色,这样很容易理解谁是谁。 It can be the same array colors, or another array. 它可以是相同的阵列颜色,也可以是其他阵列。

You could use custom properties. 您可以使用自定义属性。 It is possible to access them through feature.get('name') when rendering and then vary the color based on that. 渲染时可以通过feature.get('name')访问它们,然后根据其更改颜色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM