This worked - thank you! I was going to update the documentation, but by the time I woke up, Jeff had beat me to it <https://github.com/MapServer/MapServer-documentation/commit/0e7c9da79514659b1c879e0fabc91c8104902c04> :)
Em qua., 3 de fev. de 2021 às 19:16, Tamas Szekeres <[email protected]> escreveu: > Iljya, > > You might probably try Union_SourceLayerName as the attribute name. > > Best regards, > > Tamas > > > > > Iljya Kalai <[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 >> >
_______________________________________________ mapserver-users mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/mapserver-users
