In MapGuide Open Source, I've defined 10 layers, along with a theme for each. As I understand it, a theme represents how different data values are represented. For each theme, I picked two colors and created a gradient from the lowest data value to the highest.

On my map, I use WMS to render the layers. They render properly, with theming visible. However, I'd also like to generate a legend graphic for the theme.

I've tried this request: /mapguide/mapagent/mapagent.fcgi?version=1.0.0&operation=getlegendimage&THEMECATEGORY=-1&TYPE=-1&format=image/PNG&SCALE=44076.203877482876&layerdefinition=Library://OneOfMyLayers.LayerDefinition. However, that only returns a 16x16 pixel representation of a single point.

Instead, I want a graphic that displays the theme gradient. This is a standard WMS function, yet I haven't found any way to do it out of MapGuide Open Source.

Is there any way to generate such a theme gradient legend with MapGuide Open Source?

1 Answer 1


Does it work with unique values?

The gradient theme should not be a continous gradient but a color mapping to however many classes you have defined. I am guessing you want a to-from return.

I can't find anything about this in the documentation.

However did see a post stating that the object (talking about a google map legend) was not supported in MGOS but was implemented in the external providers widget.

Then I found this thread that you may have already seen.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.