[Geomoose-users] AGS vector and styling

Dan Little theduckylittle at gmail.com
Sat Mar 30 10:12:03 PDT 2019


This is a spot we really want to revisit. Some of the vector styling
limitations are due to inherited bugs from both the ol-mapbox-style
library and the mapbox-style specification itself. One thing to keep
in mind is that the catalog can refer to multiple layers in a single
checkbox using ";" as the delimiter for the paths in the mapbook.

Cheers,

-Duck

On Mon, Mar 25, 2019 at 9:06 AM James Klassen <klassen.js at gmail.com> wrote:
>
> 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
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users


More information about the Geomoose-users mailing list