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

What I would like to do is shown in the figure below. How can I add this color ramp legend in a mapfile which will also be linked to a raster. I don't know how to get it working while drawing a figure based on that mapfile.

Thanks !


share|improve this question

This question has an open bounty worth +50 reputation from Gery ending tomorrow.

The question is widely applicable to a large audience. A detailed canonical answer is required to address all the concerns.

Did anyone find a solution about it? I need to display a legend from a mapfile serving a TIFF raster and the solution needs to be provided from the mapfile itself.

Nice map! Why would you want to use a mapfile generated legend here? What you have looks fine. – Decio Jun 25 '13 at 19:37
What I am doing is to build an online web system which is for my Master Thesis. So I can't use ArcGIS. – Yu Guo Jun 26 '13 at 8:18
Got it! No, I am not saying to use ArcGIS, use mapserver. I am only saying do not use mapserver to generate the legend, just do it in html and css and you will have nicer results. – Decio Jun 26 '13 at 10:37
It sounds interesting. Could you give me some clue or useful example? Thanks – Yu Guo Jun 26 '13 at 12:36
So this question was asked 2 years ago, and wondering whether you found your solution. – nmtoken Feb 13 at 15:17

Your Answer


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

Browse other questions tagged or ask your own question.