On Fri, Jan 02, 2009 at 08:04:23AM -0700, Bill Thoen wrote: > 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.
This is really a question for the MapServer list, which is why I said: "you simply need to figure out the right parameter to send to MapServer" I'm not a MapServer user, but the documentation seems to be quite clear: http://mapserver.osgeo.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url -- Chris > 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, > > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
