We should allow overlays to have select styles as well. Here is my use case:

I have to data layers. One uses markers style and one uses a radius style. But, both use the default select style when clicking on it for something like a popup.

Technically we should support per-layer temporary styles as well, but I am not sure about the use case.

CommentFileSizeAuthor
#7 LayerStyles3.patch6.37 KBstrk
#6 LayerStyles2.patch6.29 KBstrk
#4 LayerStyles.patch6.32 KBstrk

Comments

strk’s picture

+1

The layer_styles array in rendered map would need to be an associative array with
'default', 'select' and optionally 'temp' too.

My use case is I'm using cluster-population-dependent style for my layer, and don't want
the clustering style to be dropped when clicking on the point (select)

tmcw’s picture

Yeah, sounds about right. This will have to break the structure, of course, so we should increment the 'api version' of styles when this and dynamic styles go in.

strk’s picture

strk’s picture

Status: Active » Needs review
StatusFileSize
new6.32 KB

Initial patch. Retain compatibility with old preset formats.

Status: Needs review » Needs work

The last submitted patch, LayerStyles.patch, failed testing.

strk’s picture

Category: feature » task
Status: Needs work » Needs review
StatusFileSize
new6.29 KB

Reattaching a version of the patch with no prefix, hopefully making the system checker happier.
NOTE that this patch introduces a conflict with the one for dynamic styles, so I'd like to see this
in ASAP in order to go on with the latter.

Just a word from you guys and I'll commit happly :)

strk’s picture

StatusFileSize
new6.37 KB

This new version _even_ works :)

[ sorry, my problem is I'm working with styles using dynamic plugins from a branch not having dynamic plugins support ]

strk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.