Opened 15 years ago

Last modified 14 years ago

#1281 closed defect

Path corrections and small template extensions in mapviewerphp/layerdefinitionfactory.php — at Version 7

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)

Change History (10)

by gabrimonfa, 15 years ago

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

by gabrimonfa, 15 years ago

Attachment: arearule.templ.diff added

trivial template extension to accept also $strokeThickness and $strokeColor

by gabrimonfa, 15 years ago

Attachment: linerule.templ.diff added

trivial template extension to accept also $strokeThickness

comment:1 by tomfukushima, 15 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, 15 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, 14 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, 14 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, 14 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, 14 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.