diff --git a/lib/OpenLayers/StyleMap.js b/lib/OpenLayers/StyleMap.js index 17940f44a1..3a1c9ff920 100644 --- a/lib/OpenLayers/StyleMap.js +++ b/lib/OpenLayers/StyleMap.js @@ -22,8 +22,8 @@ OpenLayers.StyleMap = OpenLayers.Class({ /** * Property: extendDefault * {Boolean} if true, every render intent will extend the symbolizers - * specified for the "default" intent. Otherwise, every rendering intent - * is treated as a completely independent symbolizer. + * specified for the "default" intent at rendering time. Otherwise, every + * rendering intent will be treated as a completely independent style. */ extendDefault: true, @@ -33,7 +33,9 @@ OpenLayers.StyleMap = OpenLayers.Class({ * Parameters: * style - {Object} Optional. Either a style hash, or a style object, or * a hash of style objects (style hashes) keyed by rendering - * intent + * intent. If just one style hash or style object is passed, + * this will be used for all known render intents (default, + * select, temporary) * options - {Object} optional hash of additional options for this * instance */ @@ -52,6 +54,8 @@ OpenLayers.StyleMap = OpenLayers.Class({ if(style instanceof OpenLayers.Style) { // user passed a style object this.styles["default"] = style; + this.styles["select"] = style; + this.styles["temporary"] = style; } else if(typeof style == "object") { for(var key in style) { if(style[key] instanceof OpenLayers.Style) { @@ -63,6 +67,8 @@ OpenLayers.StyleMap = OpenLayers.Class({ } else { // user passed a style hash (i.e. symbolizer) this.styles["default"] = new OpenLayers.Style(style); + this.styles["select"] = new OpenLayers.Style(style); + this.styles["temporary"] = new OpenLayers.Style(style); break; } }