Ticket #259 (closed defect: wontfix)

Opened 10 years ago

Last modified 10 years ago

When drawing points with no symbol a tiny "dot" appears

Reported by: wbronsema@… Owned by: dmorissette
Priority: high Milestone:
Component: MapScript-PHP Version: 4.0
Severity: normal Keywords:
Cc:

Description

If you draw a point with a label but no symbol using 3.7 you get a tiny "dot" 
where the symbol should be.  This did not happen in 3.6.

Attachments

label_example.zip Download (1.5 KB) - added by wbronsema@… 10 years ago.
Two code samples: one for 3.6 and the other for 3.7

Change History

Changed 10 years ago by dmorissette

Can you please provide a copy of your layer definition to facilitate reproducing 
this?

Changed 10 years ago by wbronsema@…

Two code samples: one for 3.6 and the other for 3.7

Changed 10 years ago by dmorissette

  • cc steve.lime@… added
  • status changed from new to assigned
Thanks for the code samples Bill, I was able to reproduce and identify the 
problem.  It turns out that the bug would be in 3.6 and not in 3.7.  If you set 
the CLASS color then you should get a dot.  If set the class color to -1 then 
you should not get a dot.

So to get the behavior you want (i.e. no dot) in 3.7 you should simply use:
  // set the class colour
  $o_style->color->setRGB( -1,-1,-1 );


Steve, while looking at this I found a bug in msDrawPoint() for layers of type 
ANNOTATION in MapServer 3.6's maputil.c and I'm not sure if we should fix it or 
not since users just like Bill have been used to the broken behavior for several 
versions of MapServer and might not like the new dot showing up all of a sudden 
in layers of type ANNOTATION.  Here is an excerpt of the code:

  switch(layer->type) {
  case MS_LAYER_ANNOTATION:

   // ...

    if(labeltext) {
      if(layer->labelcache)
        msAddLabel(map, layer->index, c, -1, -1, *point, labeltext, -1);
      else {
        if(layer->class[c].color == -1) {
          msDrawMarkerSymbol( ... );
          if(layer->class[c].overlaysymbol >= 0) 
                msDrawMarkerSymbol(...);
        }
        msDrawLabel(img, *point, labeltext, &layer->class[c].label, 
&map->fontset);
      }
    }
    break;


See the test for 'if(layer->class[c].color == -1)'?  I believe it should have 
been the reverse: 'if(layer->class[c].color != -1)' ... that's why markers have 
never shown up in ANNOTATION layers in the past.  When Frank modified the code 
in 3.7 to support the 24 bits colors he also fixed this test (intentionally or 
not).

What do you think, should we fix this bug in 3.6.4-dev or leave it as is to 
avoid confusing existing 3.6 users?

Changed 10 years ago by dmorissette

  • status changed from assigned to closed
  • resolution set to wontfix
Marking as WONTFIX since this is a 3.6 issue only and was already fixed in 4.0
Note: See TracTickets for help on using tickets.