[Geomoose-users] AGS vector and styling
Kevin Grootendorst
kgrootendorst at gmail.com
Sun Mar 24 10:51:40 PDT 2019
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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20190324/67c8c2f2/attachment.html>
More information about the Geomoose-users
mailing list