Openlayers 3 custom Polygon feature

المشرف العام

Administrator
طاقم الإدارة
I'm trying to create a custom Polygon style for my layer style.

I receive some information about position, orientation and age for a number of objects and I want to represent those as zoom independent (like using Icons or RegularShapes) isosceles triangles, pointing at an angle and color-coded according to age.

I have a good idea of the color-coding and rotation part, but I'm stumped at creating an isosceles triangle using the style objects provided by OpenLayers.

This is what I have so far:

style = [new ol.style.Style({ geometry: function(feature) { return new ol.geom.Polygon([[ [0, 0], [2, 0], [1, 3] ]]); }, fill: new ol.style.Fill({color: '#000'}) //black right now})]

أكثر...
 
أعلى