Thanks Iljya and Tamas, I have confirmed that the documentation was
outdated, and has now been fixed as recommended by Tamas.
Iljya: I tested successfully with:
EXPRESSION ("[Union_SourceLayerName]" = "LAYER1")
and welcome to the MapServer community! :)
-jeff
--
Jeff McKenna
GatewayGeo: MapServer Consulting and Training Services
co-founder of FOSS4G
http://gatewaygeo.com/
On 2021-02-03 2:16 p.m., Tamas Szekeres wrote:
Iljya,
You might probably try Union_SourceLayerName as the attribute name.
Best regards,
Tamas
Iljya Kalai <[email protected] <mailto:[email protected]>> ezt
írta (időpont: 2021. febr. 3., Sze, 18:54):
Hi everyone,
I'm trying to select data from multiple OGR layers and style them
based on the source layer, as well as some attributes that are not
common to all layers.
I discovered the UNION layer
<https://mapserver.org/mapfile/union.html#union> which seems to be
the answer. According to the documentation
<https://mapserver.org/mapfile/union.html#union> the source layer
name should be in the [Combine_SourceLayerName] attribute. However,
I get this error when I try to use it:
msOGRLayerInitItemInfo(): OGR error. Invalid Field name:
Combine_SourceLayerName in layer `LAYER1'
(I also tried [Union:SourceLayerName] which I found in the
mapunion.c code
<https://github.com/MapServer/MapServer/blob/0f7bbf67ce7c6fec0feaa0b33033daf02e406b9b/mapunion.c#L39>,
but that gives the same error.)
Map file snippet:
LAYER
NAME "U"
STATUS DEFAULT
CONNECTIONTYPE UNION
CONNECTION "LAYER1,LAYER2"
CLASS
NAME "C1"
EXPRESSION ("[Combine_SourceLayerName]" = "LAYER1")
...
Any ideas?
Thanks!
Iljya
P.S I'm new here!
_______________________________________________
mapserver-users mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/mapserver-users