[ka-Map-dev] [Bug 1304] New: unnecessary use of transparency when
there are no groups
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Sat Feb 25 12:03:39 EST 2006
http://bugzilla.maptools.org/show_bug.cgi?id=1304
Summary: unnecessary use of transparency when there are no groups
Product: ka-Map
Version: 0.2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: core
AssignedTo: ka-map-dev at lists.maptools.org
ReportedBy: pspencer at dmsolutions.ca
Steve W. has uncovered a problem in the architecture of how tiles are requested. There is a block of
code in tile.php that decides if new tiles should be generated with transparency or not. The check to
decide this is based on whether a group or layer was requested for the tile. Unfortunately tile.php is
ALWAYS sent a group name even if no groups are in the map file because all ungrouped layers are
considered to be part of the group __base__.
Note the background color issue is separate and needs to be investigated separately. That works for
me and for everyone else so I'm not sure what the issue is for Steve there.
Steve's original email and my response:
line 255 of init.php sets up the call to map.setBackgroundColor which should set the background color
of the viewport to the background color of the map file.
In tile.php, you should only hit that line of code if you are using groups or layers in the request. I just
realized that the way things are structured, this will always happen because the default _layer.setTile
will append g=__base__ for these ungrouped layers.
One way to work around this would be in init.php and the other in tile.php. In either case, the check
would be to get all the group names from the map file and if there are none, then that either tile.php
isn't called with g= OR tile.php makes the check part of the condition in the if statement. Thinking
about it, this last option is probably the easiest to do and won't have a big impact on performance since
it only affects tile generation.
I'll file a bug with this email as reference
Cheers
Paul
On 25-Feb-06, at 9:41 AM, Stephen Woodbridge wrote:
Hi Paul,
We do not use GROUPs in out mapfiles and all layers are set to DEFAULT, so our image end up in the
"__base__" layer by default which is fine, but there is a bug in tile.php line#215 sets the transparency to
MS_ON which results in all the background color being eliminated from the tiles.
Is init.php or some other mechanism supposed to pick up the map background color and set the
viewport background to this color? That might be nice. What are other people doing to get the
background set?
Thanks,
-Steve W.
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Please do NOT reply to this email, use the link above instead to
login to bugzilla and submit your comment. Any email reply to this
address will be lost.
More information about the ka-Map-dev
mailing list