[OpenLayers-Users] Can't define hover behavior on a Feature.Vector or a Layer.Vector

mail.roliveira at gmail.com mail.roliveira at gmail.com
Tue Aug 27 07:27:53 PDT 2013


No. This is not working as intended...


That works only if the feature.vector doesn't have a style applied. If it does, the layer's render intents are not used, and each feature.vectors remains the same.


Could this be a bug?





Sent from Alto - altomail.com


From: diegoguidi at gmail.com<diegoguidi at gmail.com>
To: mail.roliveira at gmail.com<mail.roliveira at gmail.com>
cc: openlayers-users at lists.osgeo.org<openlayers-users at lists.osgeo.org>
Sent: Monday, August 26, 2013
Subject: Re: [OpenLayers-Users] Can't define hover behavior on a Feature.Vector or a Layer.Vector

On Mon, Aug 26, 2013 at 12:19 PM, mail.roliveira at gmail.com
<mail.roliveira at gmail.com> wrote:
> If an OpenLayers.StyleMap was supported I could define a renderIntent and
> therefore maybe implement the select behaviour.

you can use the style for default in the stylemap that you can pass to
vector layer
var layer_style = new OpenLayers.StyleMap({
            "default": new
OpenLayers.Style(OpenLayers.Util.applyDefaults({... })
            "select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({... })
        })

;var vectorLayer = new OpenLayers.Layer.Vector("prach layer", {
styleMap: layer_style,
renderers: ['SVG', 'VML', 'Canvas']
})

;Diego Guidi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130827/1b62b8b0/attachment.html>


More information about the Users mailing list