[Geomoose-users] AGS vector and styling

James Klassen klassen.js at gmail.com
Mon Mar 25 07:06:20 PDT 2019


Multiple map-sources (all controlled by one catalog layer) will likely
work, however, this seems kludgey to me.  An easier way to accomplish this
seems worth an enhancement ticket.

I know theduckylittle has come up against some limitations with the current
styles library that will require some rework to move forward.  So, if
someone wants to take this on, coordinate with theduckylittle first.

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

>
> Well I suppose you could have 2 mapsources with different names, and
> different filters?
>
> On Sun, Mar 24, 2019 at 6:13 PM Kevin Grootendorst <
> kgrootendorst at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
> 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/20190325/6ce9cd9f/attachment.html>


More information about the Geomoose-users mailing list