Openlayers 3 - Create symbol like openlayers 2 -> OpenLayers.Renderer.symbol.anySymbo

المشرف العام

Administrator
طاقم الإدارة
Openlayers 3 - Create symbol like openlayers 2 -> OpenLayers.Renderer.symbol.anySymbo

In the Openlayers v2 I could add symbols like:

OpenLayers.Renderer.symbol.pointToIcon = [100, 70, 20, 50, 42, 70, 20, 90];How can I do it with Openlayers 3 ?

In the openlayers 3 I can use this feature:

var starSymbol = new ol.style.RegularShape({ points: 4, opacity: .5, radius: 10, radius2: 10 * .5, angle: 130, fill: new ol.style.Fill({ color: "blue" }), stroke: new ol.style.Stroke({ color: "red", width: 1 })});I can make the other figures,but I can't make the following figure.



In addition, I don't use 'Icon' like:

new ol.style.Style({ image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({ anchor: [0.5, 46], anchorXUnits: 'fraction', anchorYUnits: 'pixels', opacity: 0.75, src: 'data/icon.png' }))})Because the color of icon is fixed and I can't use my needed colors.

I really appreciate it if you help me.



أكثر...
 
أعلى