[mapguide-internals] Fwd: Feature stylization draw order question
Jason Birch
jason at jasonbirch.com
Mon Nov 23 02:42:02 EST 2009
Thanks guys,
I went with Walt's original suggestion of adding a second symbol instance
and it seems to be working fine. Whew! :)
I'm not especially worried about performance (I'm dealing with no more than
200 features: essentially no increase in memory or CPU use when rendering
and the entire map at full extents is still sub-second). I am not running a
patched version of MapGuide so some of the symbol labels don't render, and
I'd rather see them--even with over-posted text--than not at all.
I'm not seeing any major anti-aliasing artifacts, though I was expecting
some because I'm basically just overlaying two 32bit transparent PNGs.
It sure is nice to be able to move beyond this. I find myself once again
thankful that MapGuide uses native XML (instead of some hinky binary format)
and that Maestro allows me to edit any resource's XML. Power tools rock! :)
Thanks again for all the help,
Jason
2009/11/22 Walt Welton-Lair
> Except then the legend icon will show the rectangle, and not his symbol.
> But yeah it would improve performance.
> ________________________________________
> From: Traian Stanev
> Sent: Sunday, November 22, 2009 6:42 PM
> Subject: RE: [mapguide-internals] Fwd: Feature stylization draw order
> question
>
> You could reduce the cost of the second (non-label) draw by drawing an
> almost transparent rectangle instead of the symbol geometry in the rendering
> pass that's used for tooltips -- drawing the same symbol on top of itself
> can also have undesirable side effects on edge antialiasing.
>
> Traian
>
> ________________________________________
> From: Walt Welton-Lair
> Sent: Sunday, November 22, 2009 4:21 PM
> Subject: RE: [mapguide-internals] Fwd: Feature stylization draw order
> question
>
> I think tooltips are missing because nothing is being drawn during the
> regular rendering pass. Tooltips are not generated against labels.
>
> Another side affect to using a symbol label alone is that nothing is drawn
> in the legend for that layer - label symbols are not included in legend
> icons.
>
> I think you can fix both issues by adding a second non-label version of
> your symbol to the composite symbolization (a second symbol instance). The
> non-label symbol is configured with DrawLast and AddToExclusionRegion set to
> false - it will be used for the legend icon and tooltips. You want
> AddToExclusionRegion false so it doesn't affect labels on other layers. And
> no need to specify CheckExclusionRegion - it doesn't apply since it's not a
> label. The label symbol - the one you already have - is configured with
> DrawLast / AddToExclusionRegion set to true and CheckExclusionRegion set to
> false. This one should draw exactly on top of the first one to give you the
> final visual effect you want. It will be a little slower because you're
> rendering two symbols, but as long as you don't have gobs of point features
> it shouldn't be noticeable.
>
> Walt
>
>
More information about the mapguide-internals
mailing list