Opened 14 years ago

Closed 13 years ago

#1281 closed defect (fixed)

Path corrections and small template extensions in mapviewerphp/layerdefinitionfactory.php

Reported by: gabrimonfa Owned by: brucedechant
Priority: low Milestone: 2.3
Component: General Version: 2.2.0
Severity: trivial Keywords:
Cc: External ID:

Description (last modified by brucedechant)

All path in mapviewerphp/layerdefinitionfactory.php pointing to ../../viewerfiles should be corrected to ../viewerfiles

CreateAreaRule can be extended to accept two more parameters, $strokeThickness and $strokeColor. CreateLineRule can be extended to accept one more parameter, $strokeThickness

This two last modifications require to modify accordingly also the areaRule and lineRule templates in viewerfiles.

All attached unified diff files refer to <file>_20100226.php (the original one) and <file>.php (the modified one)

Attachments (3)

layerdefinitionfactory.php.diff (4.9 KB ) - added by gabrimonfa 14 years ago.
diff between the current version (ayerdefinitionfactory_20100226.php) and the proposed one
arearule.templ.diff (461 bytes ) - added by gabrimonfa 14 years ago.
trivial template extension to accept also $strokeThickness and $strokeColor
linerule.templ.diff (374 bytes ) - added by gabrimonfa 14 years ago.
trivial template extension to accept also $strokeThickness

Download all attachments as: .zip

Change History (15)

by gabrimonfa, 14 years ago

diff between the current version (ayerdefinitionfactory_20100226.php) and the proposed one

by gabrimonfa, 14 years ago

Attachment: arearule.templ.diff added

trivial template extension to accept also $strokeThickness and $strokeColor

by gabrimonfa, 14 years ago

Attachment: linerule.templ.diff added

trivial template extension to accept also $strokeThickness

comment:1 by tomfukushima, 14 years ago

Thanks for this but what is this fixing and how can we reproduce the problem that it is fixing?

comment:2 by gabrimonfa, 14 years ago

Well, paths are wrong since the directory "viewerfiles" is in the parent directory, not in the parent of the parent ("mapviewerphp" and "viewerfiles" are sibling).

The enhancement allows to specify stroke thickness and color that are hard coded in the templates (we use it to have different colors redlining). Thus I propose to modify the templates and the functions in layerdefinitionfactory.php that instantiate the templates

comment:3 by brucedechant, 14 years ago

Milestone: 2.3
Owner: set to brucedechant

comment:4 by tomfukushima, 13 years ago

Here is some info that will be useful for reproducing this from an email from Gabriele to mapguide-internals: redlining in php appears to be broken, since template files are not found.

comment:5 by brucedechant, 13 years ago

The changes look good. However, the createlayer.php file will also need to be updated to work with these changes.

Also, I would like to change the order of parameters from what you had:

static function CreateLineRule($legendLabel, $filter, $strokeThickness, $color)

To:

static function CreateLineRule($legendLabel, $filter, $color, $strokeThickness)

This way the new parameter is on the end.

comment:6 by brucedechant, 13 years ago

I take back my suggestion on changing the order of the parameters as the order you have matches the schema.

comment:7 by brucedechant, 13 years ago

Description: modified (diff)

comment:8 by brucedechant, 13 years ago

Fixed path. r5383

comment:9 by gabrimonfa, 13 years ago

Thank you for working on this. For me it's ok to close this enhancement.

comment:10 by brucedechant, 13 years ago

I would like to update this ticket to refer to only the path issue as it is a defect. Could you please create a new ticket with your enhacement ideas?

comment:11 by gabrimonfa, 13 years ago

Type: enhancementdefect
Version: 2.1.02.2.0

Sure, I would have differentiated the defect and the enhancement from the beginning. I've opened http://trac.osgeo.org/mapguide/ticket/1522

that addresses the "enhancement part"

comment:12 by brucedechant, 13 years ago

Resolution: fixed
Status: newclosed

Closing this ticket as the defect has been fixed and the enhancement has been moved to ticket 1522

Note: See TracTickets for help on using tickets.