[Geomoose-users] AGS vector and styling

Kevin Grootendorst kgrootendorst at gmail.com
Sun Mar 24 18:12:55 PDT 2019


Thanks for the suggestion.
I tried that...If I have two instances of <layer name="Trails">, each with
it's own Filter, then unfortunately only the first instance of  <layer
name="Trails"> is interpreted.
I believe that the layer name must be "Trails" as that's what is identified
in the REST properties in the above REST url.

On Sun, 24 Mar 2019 at 20:49, TC Haddad <tchaddad at gmail.com> wrote:

>
> You could try having more than one layer in the map source - one for each
> filter item?
>
> On Sun, Mar 24, 2019 at 10:51 AM Kevin Grootendorst <
> kgrootendorst at gmail.com> wrote:
>
>> Update:
>> I'm able to use <filter> to style for one condition, but am unable to do
>> for 2 or more conditions.
>>
>> In the example below, I can filter the REST service to only show Trails
>> that are "Seasonal".
>>
>>     <map-source name="ags5" type="ags-vector" srs="EPSG:3857"
>> title="Norfolk Trails">
>>         <url>
>> http://services1.arcgis.com/mSGV2hCLXHNsfQqK/arcgis/rest/services/Trails/FeatureServer/0
>> </url>
>>
>>         <layer name="Trails" status="on">
>>                 <style><![CDATA[
>>                     {
>>                         "line-color" : "#A1A138",
>>                         "line-width" : 2
>>                     }
>>                     ]]>
>>                 </style>
>>                 <filter><![CDATA[
>>                 ["==", "STATUS", "Seasonal"]
>>                 ]]></filter>
>>         </layer>
>>     </map-source>
>>
>> There is another "STATUS" = "Maintained" that I wish to also style.
>> I've tried adding another <style> and <filter> for "Maintained" trails,
>> but it will only draw the first <style> tags, which correspond to
>> "Seasonal" trails.
>> I also tried using <div> tags to somehow separate the two but that had no
>> effect.
>>
>> Any other ideas on what I could try?
>>
>> Thanks.
>> Kevin
>>
>>
>> On Sun, 17 Mar 2019 at 17:24, Kevin Grootendorst <kgrootendorst at gmail.com>
>> wrote:
>>
>>> Hello,
>>> Can an ags-vector data type be styled based on attributes?
>>> I understand the <style> tags, but they currently return one style for
>>> the entire layer.
>>> <layer name="Municipal_Land_Use_Plans" status="off">
>>>             <style><![CDATA[
>>>                 {
>>>                     "line-color" : "#0e57cc",
>>>                     "line-width" : 2
>>>                 }
>>>                 ]]>
>>>             </style>
>>>             <template name="identify" auto="true"/>
>>>             <param name="FORMAT" value="png"/>
>>>         </layer>
>>>
>>> If the layer has a field called 'Type' with unique attributes (wetland,
>>> farm, etc.), can I style it based on this field?
>>>
>>> Thanks.
>>>
>>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20190324/a2b4e494/attachment.html>


More information about the Geomoose-users mailing list