Good morning,

I have a problem with the zindex of label in my marker. The ZIndex is 
respected with the marker type Image, but when I tried to add a label : 
Zindex is not apply on the label.

<https://lh3.googleusercontent.com/-k8A8PKKihSg/WCbMfiO1gVI/AAAAAAAADcg/4S60oMFnkxoHy2nXkyU9jhEr7ybXPRDeQCLcB/s1600/1.jpg>
<https://lh3.googleusercontent.com/-4D4Xv0wnBwY/WCbMkdtyJNI/AAAAAAAADck/OFyTlbPh3G8a98VD-Lll9TabUk1D5K-jACLcB/s1600/2.jpg>


















I used the code see below :
var features = [];
var myStyle = new ol.style.Style({zIndex: 1,image: new 
ol.style.Icon(({anchor: [0.5, 74],anchorXUnits: 'fraction',anchorYUnits: 
'pixels',src: '/css/images/markerB.png'})),text: new ol.style.Text({font: 
'100 28px icon_set_1',text: "Z",offsetY: -52,fill: new 
ol.style.Fill({color: 'black'})})});
var lat = 3;
for(i=0;i<=0.5;i+=0.1) {
  var lon = 50 + i;
  var iconFeature = new ol.Feature({geometry: new 
ol.geom.Point(ol.proj.transform([lon,lat], 'EPSG:4326',     'EPSG:3857'))});
  iconFeature.setStyle(myStyle);
  features.push(iconFeature);
}
vectorSource = new ol.source.Vector({features: features});vectorLayer = new 
ol.layer.Vector({source: vectorSource});map.addLayer(vectorLayer);

May be somebody can tell me, what I'm doing wrong ?
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups "OL3 
Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ol3-dev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ol3-dev/43c8849a-e9ca-42c9-bd8f-472333c5d1a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to