[OpenLayers-Users] Where Do I Find A List of Available Hashtable Options?

Bill Thoen bthoen at gisnet.com
Fri Jan 2 10:04:23 EST 2009


Thanks for the info, Christopher.

However, the syntax  you list  for overriding the MapServer  map file 
parameter doesn't work. If you (or anyone else)  knows how I can 
override the layer color to yellow (255 255 0) in OpenLayers from a map 
file that looks like the following, I'd appreciate knowing what the 
trick is.

   LAYER
      NAME "states"
      TYPE POLYGON
      DATA states
      CLASS
         NAME "US States"
         STYLE
            OUTLINECOLOR 100 100 100
            COLOR 255 255 192
         END
      END
      PROJECTION
         "init=epsg:32614" # UTM Zone 14 N WGS84
      END
      STATUS DEFAULT
   END



Christopher Schmidt wrote:
> On Thu, Jan 01, 2009 at 04:08:24PM -0700, Bill Thoen wrote:
>   
>> In several places in the OpenLayers Constructor functions there is a 
>> parameter that is an object consisting of a "Hashtable of extra 
>> options...", but I can't find a list of what those choices might be. For 
>> example, the fourth parameter for OpenLayers. Layer. MapServer() is such 
>> an object. What are the available tags that can be used here and where 
>> do I find out what these are? Are they the parameters from a map file, 
>> like LAYER.CLASS.STYLE.COLOR: "255 255 0" or something like that?
>>     
>
> Options override the 'properties' of the layer: anything that is listed
> as a property of the Layer in the API documentation can be overridden
> via the options hash.
>
> What you want is another parameter (the third param): something like
> {'layers': 'a, b', 'layers[a].class.style.color': 'red'}. The third
> parameter is serialized and sent directly to the server with *no*
> intervention on the part of OpenLayers (except in WMS, where keys are
> uppercased); this means that you simply need to figure out the right
> parameter to send to MapServer and include it as a key/value pair in the
> parameters hash.
>
> Regards,
>   



More information about the Users mailing list