I am trying to set COLORRANGE and DATARANGE via url. Using the url below<br><br><br>--------<br><a href="http://xxx.yyy.zzz/cgi-bin/MapService?layers=mesh10m&mode=map&map_imagetype=png&map.layer[mesh10m].class[0].style[0]=DATARANGE+0+1000+COLORRANGE+255+100+0+0+100+255">http://xxx.yyy.zzz/cgi-bin/MapService?layers=mesh10m&mode=map&map_imagetype=png&map.layer[mesh10m].class[0].style[0]=DATARANGE+0+1000+COLORRANGE+255+100+0+0+100+255</a><br>
--------<br><br><br>I get the errormessage: <br><br><br>--------<br>loadStyle(): Unknown identifier. Parsing error near (DATARANGE):(line 1)
<br>--------<br><br><br>I am using mapserver 5.9.1 (unfortunately unknown build).<br>Looking at the source code for versions 5.6.7 and 6.0.1 at the definition of loadStyle in mapfile.c <br>it seems that both DATARANGE and COLORRANGE are unknown although they are in the switch<br>
statement and also both defined (without special ifdefs) in mapfile.h. Other keywords e.g. COLOR <br>work fine using identical syntax.<br><br><br>Does anybody have a suggestion where the problem may be found? My goal is to set DATARANGE <br>
and COLORRANGE using OpenLayers. Any suggestions how to accomplish this would of course be<br>also very welcome.<br><br>- Till<br><br>----- extract from mapfile.c (version 5.6.7) -----<br> <br>int loadStyle(styleObj *style) {<br>
int symbol;<br><br> for(;;) {<br> switch(msyylex()) {<br> /* New Color Range fields*/<br> case (COLORRANGE):<br> /*These are both in one line now*/<br> if(loadColor(&(style->mincolor), NULL) != MS_SUCCESS) return(MS_FAILURE);<br>
if(loadColor(&(style->maxcolor), NULL) != MS_SUCCESS) return(MS_FAILURE);<br> break;<br> case(DATARANGE):<br> /*These are both in one line now*/<br> if(getDouble(&(style->minvalue)) == -1) return(-1);<br>
if(getDouble(&(style->maxvalue)) == -1) return(-1);<br> break;<br> case(RANGEITEM):<br> if(getString(&style->rangeitem) == MS_FAILURE) return(-1);<br> break;<br> /* End Range fields*/<br>
case(ANGLE):<br> if((symbol = getSymbol(3, MS_NUMBER,MS_BINDING,MS_AUTO)) == -1) return(MS_FAILURE);<br><br> if(symbol == MS_NUMBER)<br> style->angle = (double) msyynumber;<br> else if(symbol==MS_BINDING){<br>
if (style->bindings[MS_STYLE_BINDING_ANGLE].item != NULL)<br> msFree(style->bindings[MS_STYLE_BINDING_ANGLE].item);<br> style->bindings[MS_STYLE_BINDING_ANGLE].item = strdup(msyytext);<br>
style->numbindings++;<br> } else {<br> style->autoangle=MS_TRUE;<br> }<br> break;<br>...<br> default:<br> if(strlen(msyytext) > 0) {<br> msSetError(MS_IDENTERR, "Parsing error near (%s):(line %d)", "loadStyle()", msyytext, msyylineno);<br>
return(MS_FAILURE);<br> } else {<br> return(MS_SUCCESS); /* end of a string, not an error */<br> }<br> }<br> }<br>}<br>