[mapguide-users] Printing Shortcomings Especially Legend Rendering
Kenneth, GEOGRAF A/S
ks at geograf.dk
Thu May 8 13:47:14 EDT 2008
I have taken the long way, and implemented a decent legend generator in C#.
Unfortunately I cannot give it away, as it belongs yo my employer.
It works by imitating the legend control in the basic viewer, and
fetches each of the little preview items.
It does scale checking and more for the layers.
Once all have been retrieved, it builds a single png with a sane layout
(ea. no empty groups etc).
It would be nice if there was such a method in MapGuide, especially if
it was also possible to display legend items for features that were
actually visible in the map.
ea.: if the "Lakes" layer is on, but I have zoomed in on a building with
no lake in sight, it should not display "Lakes" in the legend.
As for general printing, I have also taken the long way and created a
full upscaling function that can upscale a map's components to fit a
larger resolution.
I use this for generating high quality PDF files. As before, it belongs
to my employer.
Again, it would be nice if this was avalible in MapGuide (both
upscaling, as well as PDF generation).
Regards, Kenneth Skovhede, GEOGRAF A/S
Keith Campbell skrev:
> The quality of print output has been talked about before. I'm investigating
> what options there are to improve this.
> Perhaps the main issue is the legend output. With both the AJAX and DWF
> viewer, the legend is rendered with layers set to not display in the legend
> included, and Group headings included even if these are don't include any
> visible layers. Besides looking rather messy, this behaviour also means that
> a complex map with many layers/groups soon overflows the legend area.
> The API only sems to have one method dealing with the legend,
> RenderMapLegend, and this seems to be the call that produces the behaviour
> already described. There doesn't seem to be any methods that allow greater
> control.
> I'd be interested to hear from others on how they may have overcome these
> problems.
>
> Keith
>
More information about the mapguide-users
mailing list