Just looking for ideas regarding another dynamic WMS and WMC question ... As described in other posts about this project I am working on, we have a process that dynamically generates Shapefiles and then, using a "blank" Map file acting as a WMS server, we do GetMap requests that include the DATA path to the new file to add the individual vector layers to a single image.
We have another "blank" Map file that we use to print these layers. For this we pass a WMC context that defines all the layers that should be included. While I hope that background explanation is good enough for the purposes of this post, if it is not, a more detailed description of this process (including examples) can be found at:http://osgeo-org.1803224.n2.nabble.com/mode-map-with-WMC-of-dynamic-lt-Layer-gt-failing-with-getString-error-td5824774.html#a5831237 Now, my problem... The "blank" WMS server Map file has 3 layers in it: a point, a line and a polygon. Each have their own unique name: "Point", "Line", "Polygon". When we add a dynamic vector/WMS layer individually, the WMS GetMap request uses that name to indicate which layer provides the basic configuration. When that layer is added to the WMC for printing, that name is used as the value of the Layer's Name entity in the LayerList to indicate which Map file layer to use. All this is fine unless there are more than one of the same type of layer added to the WMC. At that time, there are multiple LayerList Layers with the same Name value (say, "Line") in the WMC. So, my question is this... Is there any way of dynamically assigning a name to a layer in the mapfile. I really can't imagine that there is but am wondering if there's some way of using something like the DATAPATTERN for a layer where, say, as long as the format of characters match it will use that layer. Something like: LAYER NAME "line" NAMEFORMAT "Line*" STATUS ON TYPE line PROJECTION "init=epsg:42304" END CLASS COLOR 0 0 0 NAME "Some Line Layer" END METADATA "wms_title" "Some Line Layer" END END So that if I made a request as below it would resolve to figuring out what the correct layer to use is but still allow that unique name to be used to reference it: http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/testing/dynamic.map&request=getMap&service=wms&version=1.1.1&map.layer[LineOfRoads]=DATA ‘id3/vector’ END&layers=LineOfRoads&srs=EPSG:42304&bbox=-2338951,-800000,3008692,3900000&format=image/png&height=300&width=300 I don't really expect that it would actually work like this...the amount of time necessary for processing and resolving requests would be prohibitive. I'm just trying to suggest something that might convey what we're trying to accomplish in the hopes of causing some creative juices to spill out there and asking if anyone knows of any way (even an obscure one) that will allow us to get unique Name values into the printing WMC. Cheers, jtm -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Another-dynamic-WMS-server-and-WMC-question-dynamic-Name-anyone-tp6162084p6162084.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
