Opened 14 years ago

Closed 13 years ago

#137 closed enhancement (wontfix)

Database config - automatic WMS layer merging issue

Reported by: adube Owned by:
Priority: minor Milestone: 1.0.0
Component: server Version:
Keywords: Cc:

Description

The current behavior

The new PGSQLMapContextConfig driver automatically creates OpenLayers.Layer objects using the resource options and depending on the service type of the resource, see more details here.

The resources sharing the same wms service are always automatically merged together, forming a single OpenLayers.Layer.WMS object, which is a good performance behavior.

The issue

However, what if we want to have one of these resources to be drawn differently ? For example, we want a specific resource to be 50% transparent. Setting the 'opacity' resource option is going to affect the whole layer object since all other resources with the same wms service have been merged together.

A quick workaround

A quick workaround for this issue is to create a clone of the wms service and point the wms datastore of the resource we want to have its own layer object to it. That way, 2 layer objects are created, one with our unique resource and one with the others. The 'opacity' resource option then only affects the single layer created and we have the excepted result.

This workaround works fine to avoid the issue, but we could have a better way to solve it. Cloning objects is not a good 'long-term' solution.

Proposed 'long-term' solution

We could have a new 'groupwms' (or something similar) resource option that would be blank by default. All resources sharing the same 'groupwms' would be merged together. The default behavior would then be that all resources sharing the same wms service and not having this option defined would be merged together. So, having a single resource with its own 'groupwms' defined would let it have its unique layer and unique options defined in the resource.

An other related issue, resource options should stay 'data' related, not application...

A resource is more the definition of 'pure data' than its representation inside a map. Defining 'opacity' and 'groupwms' becomes wrong in a way. They shouldn't normally be 'resource options'. A specific resource is not 50% transparent by default (you get the idea).

These kind of options should be defined as 'mapcontext resource options'. This topic is covered in the following ticket : #121.

Change History (2)

comment:1 by adube, 13 years ago

Milestone: 1.0.0

The issue described in only apply when using the legacy widgets (map, mapfishlayertree) which could become deprecated in 1.0.

comment:2 by adube, 13 years ago

Resolution: wontfix
Status: newclosed

'map' and 'mapfishlayertree' are deprecated in 1.0.

Note: See TracTickets for help on using tickets.