Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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