#2769 closed defect (fixed)
QUERYMAP hilite color isn't applied when using a color from a data source
Reported by: | aboudreault | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 5.4 release |
Component: | MapServer C Library | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: | dmorissette, sdlime |
Description
Even if we set a QUERYMAP section with a hilite color, the color will not be applied when msDrawQueryLayer() is called if using a color from a data source. However, this works properly if we just set a RGB color directly in the mapfile. You can reproduce this easily with PHP/MapScript by calling the queryByRect() function on a layer and draw the query with the drawQuery() function. Here's an example of a layer setting (the color came from a DBF file) :
STYLE OUTLINECOLOR [outline_color] COLOR [color] SIZE 6 END LABEL TYPE TRUETYPE FONT "Arial" ANGLE AUTO SIZE 12 POSITION AUTO OUTLINECOLOR [outline_color] COLOR [color] END
The problem is in the mapdraw.c file. The msDrawShape() function that call the msBindLayerToShape() function and it override the color that has been set by the msDrawQueryLayer() function. This can be fixed by simply add a parameter to the msDrawShape() function (and msBindLayerToShape()) that means to tell the msBindLayerToShape() function if the color/outline color of the shape must be "binded" with the data source.
Attachments (1)
Change History (4)
comment:1 by , 16 years ago
by , 16 years ago
Attachment: | bug2769.patch added |
---|
comment:2 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r7922
Do you think this should be backported to 5.2 ?
Daniel, can you review the patch please ? I'm wondering if one of the conditions that i added in the maputil.c file is needed (the one for MS_LABEL_BINDING_COLOR style binding).