Hello.

According to  documentation
<https://docs.geoserver.org/stable/en/user/styling/ysld/reference/featurestyles.html#syntax>
 "x-firstMatch" property of featureType in YSLD style "Stops rule
evaluation
after the first match". But somehow it does not.

I use:

- window 7
- mongoDB 3.6
- GeoServer 2.15.2
- mongoDB plugin (for GeoServer 2.15.2)
- YSLD plugin (for GeoServer 2.15.2)

I've created a collection with data from here
<https://docs.geoserver.org/stable/en/user/data/app-schema/mongo-tutorial.html#use-case>
(just two records), created 2dsphere index

Then I've created a layer and an YSLD style for that layer:

feature-styles:
- name: some_name
  *x-firstMatch: true*
  rules:
  - filter: ${name = 'name 1'}
    symbolizers:
    - polygon:
        fill-color: 'red'
        fill-opacity: 0.5
        stroke-color: 'red'
        stroke-opacity: 0.5
  - symbolizers:
    - polygon:
        fill-color: 'yellow'
        fill-opacity: 0.5
        stroke-color: 'yellow'
        stroke-opacity: 0.5

In preview the feature with name = 'name 1' is orange (both rules are applied)
and the feature with name = 'name 2' is yellow. But first feature should be
red (not orange) - only first rule should be applied.



Why so?

Thanks in advance for any help


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Без
вирусов. www.avast.ru
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to