Ticket #12 (closed defect: fixed)

Opened 2 years ago

Last modified 18 months ago

setLayerParameters / getLayerParameters does not work correctly

Reported by: anonymous Owned by: somebody
Priority: minor Milestone:
Component: BuildTools Version: 2.2
Keywords: GeoMOOSE.updateLayerParameters Cc:

Description

When the highlight layer parameters are updated (i.e. in select.php) in case the parameter (i.e. 'map') already exists, the XML node value is changed. The value-attribute keeps the old value.

When getting the parameters with getLayerParameters, the value attribute is returned. This is not the correct value as the correct value is stored in the value attribute.

Example:
Higlight map, param. map is set to /tmp/ms_tmp/1234567890_map.
This results in an xml-tag <param name='map' value='/tmp/ms_tmp/1234567890_map>/tmp/ms_tmp/1234567890_map</param>

Change selection in select tool and 'go'. This will result in a new map file i.e. /tmp/ms_tmp/0987654321_map. When the highight layer is updated with GeoMOOSE.updateLayerParameters, the node value of param-tag with name 'map' is updated. The value-attribute remains unchanged, so tag will become <param name='map' value='/tmp/ms_tmp/1234567890_map>/tmp/ms_tmp/9876543210_map</param>

Method getLayerParameters will return /tmp/ms_tmp/1234567890_map and not /tmp/ms_tmp/9876543210_map.

Workaround I used is calling catalog.removeLayerParameter first to make sure the map parameter is not set and then set it using GeoMOOSE.updateLayerParamters. This will create the parameter correclty.

Change History

Changed 18 months ago by lenk

  • status changed from new to closed
  • resolution set to fixed

I think moose-time param was added to resolve this

Note: See TracTickets for help on using tickets.