Add the ability to set the zIndex explicitly to the addLayer call, and do so in the markers.html file. This demonstrates the creation of a marker which can be clicked upon to give the url of its icon.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -120,10 +120,14 @@ OpenLayers.Map.prototype = {
|
||||
/**
|
||||
* @param {OpenLayers.Layer} layer
|
||||
*/
|
||||
addLayer: function (layer) {
|
||||
addLayer: function (layer, zIndex) {
|
||||
layer.map = this;
|
||||
layer.div.style.overflow = "";
|
||||
layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length;
|
||||
if (zIndex) {
|
||||
layer.div.style.zIndex = zIndex;
|
||||
} else {
|
||||
layer.div.style.zIndex = this.Z_INDEX_BASE['Layer'] + this.layers.length;
|
||||
}
|
||||
this.layerContainerDiv.appendChild(layer.div);
|
||||
this.layers.push(layer);
|
||||
this.events.triggerEvent("addlayer");
|
||||
|
||||
Reference in New Issue
Block a user