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

Christopher Schmidt crschmidt at metacarta.com
Thu Jan 1 19:57:08 EST 2009


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,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list