Hi Jody,

Thanks for the answer, the syntax works well if you just have one layer,
this works fine:

{
  "version": 8,
  "name": "violet polygon",
  "layers": [
      {
          "id": "violet polygon",
          "type": "fill",
          "filter": [">", "IDN3", 710],
          "paint": {
              "fill-color": "#3300ff",
              "fill-outline-color":"#000000"
          }
      }
}

My concern is that I want multi rules, some US states displayed in green,
and others in red for instance, and I am not sure the mbstyle extension
handles it, and if yes, what it the correct syntax.
The document only shows examples with one rule.

Still I expected that to work, are you in position to write a test case and
> patch? I know the codebase enough to review.

I think we can do something yes

I am quite keen on the mbstyle technology and would like to see the
> functionality become a formal extension if we can identify enough
> interested parties for maintenance and improvements.

I totally agree, we'll try to push a bit on it if we manage to make it work
for multi rules styles layer.

Thanks for support Jody

On Wed, Jun 5, 2019 at 7:02 AM Jody Garnett <[email protected]> wrote:

> You may wish to try with function stops for the fill-color.
>
> Boundless Server had some documentation on how much of the mapbox style
> expression syntax was implemented, the filter syntax you are describing is
> now deprecated in the specticication.
>
> Still I expected that to work, are you in position to write a test case
> and patch? I know the codebase enough to review.
>
> I am quite keen on the mbstyle technology and would like to see the
> functionality become a formal extension if we can identify enough
> interested parties for maintenance and improvements.
> --
> Jody Garnett
>
>
> On Tue, 4 Jun 2019 at 02:09, Florent Gravin <[email protected]>
> wrote:
>
>> Hi guys,
>>
>> Is there a way to create a style in mbstyle format for a layer with
>> differents rules ?
>> There is only one paint per layer so i was expecting something like that
>> could work but it doesn't, "Invalid SLD".
>> The idea is to have 2 layers with 2 differents filters and paints..
>>
>> {
>>   "version": 8,
>>   "name": "violet polygon",
>>   "layers": [
>>       {
>>           "id": "violet polygon",
>>           "type": "fill",
>>           "filter": [">", "IDN3", 710],
>>           "paint": {
>>               "fill-color": "#3300ff",
>>               "fill-outline-color":"#000000"
>>           }
>>       }, {
>>           "id": "red polygon",
>>           "type": "fill",
>>           "filter": ["<", "IDN3", 710],
>>           "paint": {
>>               "fill-color": "#aa0000",
>>               "fill-outline-color":"#000000"
>>           }
>>       }
>>   ]
>> }
>>
>> Maybe it's not possible with the current implementation ?
>> Thanks for hints
>>
>> --
>> *camptocamp*
>> INNOVATIVE SOLUTIONS
>> BY OPEN SOURCE EXPERTS
>>
>> *Florent Gravin*
>> *Technical Leader - Architect*
>> +33 4 58 48 20 36
>> _______________________________________________
>> 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
>>
>

-- 
*camptocamp*
INNOVATIVE SOLUTIONS
BY OPEN SOURCE EXPERTS

*Florent Gravin*
*Technical Leader - Architect*
+33 4 58 48 20 36
_______________________________________________
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