Z-index in OpenLayers 3: layer ordering in OL3

المشرف العام

Administrator
طاقم الإدارة
Is there a method to cjange Z-indexes of layers in OpenLayers3 like it was in old version?

map.setLayerIndex(markers, 99); //set the marker layer to an arbitrarily high layer index and I need to change order of layers througout using a map, so such possibility as defining zindex like this do not help

var geoLayer = new ol.layer.Vector({ source : new ol.source.GeoJSON({ projection : 'EPSG:900913', url : './myGeoJson.json' }), style : function(feature, resolution) { var text = resolution < 5000 ? feature.get('name') : ''; if (!styleCache[text]) { styleCache[text] = [new ol.style.Style({ fill : new ol.style.Fill({ color : 'rgba(255, 255, 255, 0.1)' }), stroke : new ol.style.Stroke({ color : '#319FD3', width : 1 }), text : new ol.style.Text({ font : '12px Calibri,sans-serif', text : text, fill : new ol.style.Fill({ color : '#000' }), stroke : new ol.style.Stroke({ color : '#fff', width : 3 }) }), zIndex : 999 })]; } } });

أكثر...
 
أعلى