<div dir="ltr"><div><div>Hi everyone,<br><br></div><div>I found a URL parameter that can be 
added to ArcGIS FeatureServer service layers that makes the server 
return more complete and advanced rendering instructions for the layers.<br><br></div><div>The
 difference is mostly seen in layers which use multiple symbol layers 
such as polygons with a hatch fill. For layers like that, ArcGIS servers
 usually return a single symbol with the colors mixed.<br></div><div>I recommend trying to load the example below, first as a mapserver service to see the definitions and then as a featureserver service to see how the drawing info is currently being passed.</div><div><br></div><div>I found that if you query the layer metadata with the <u>returnAdvancedSymbols</u> URL
 parameter set to true, you get back the same response that ArcGIS Pro 
gets from the server and uses to create symbology for feature services.<br><br></div><div>So instead of requesting the metadata for a layer like QGIS currently does:<br><a href="https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json">https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json</a>  </div><div>The initial metadata query would be:<br><a href="https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json&returnAdvancedSymbols=true">https://ags.iplan.gov.il/arcgisiplan/rest/services/PlanningPublic/Xplan/MapServer/4?f=json&returnAdvancedSymbols=true</a></div><div><br></div><div>And get back a more complex result if there are advanced symbols on the layer. The drawingInfo returned is <b>mostly</b> compatible with the <a href="https://github.com/Esri/cim-spec" target="_blank">ESRI CIM spec,</a> but I already encountered some names that differed between server versions.<br></div><div>While
 the parameter only appears in esri documentation from version 11.1, I 
tested that it is working for services running on ArcGIS Server version 
as far back as at least 10.6.</div><div><br></div><div>I tried to start 
implementing this parsing in QGIS (image 3 shows rendering with my 
additions), but I want to make it optional until the parsing is complete
 and that is where I could use some help.<br></div><div>I added a checkbox to <u>QgsNewArcGisRestConnectionDialog</u>
 where the user can toggle advanced symbols for a specific service, and 
managed to save the setting in the service settings in the profile's 
QGIS3.ini file.<br><br></div><div>What I want to do next is pass this parameter on to <u>QgsAfsProvider</u> where I would use that as a switch between <u>QgsArcGisRestQueryUtils::getLayerInfo</u> and the function I added to get the metadata with advanced symbols called <u>QgsArcGisRestQueryUtils::getLayerAdvanvcedSymbolsInfo</u>.<br><br></div><div>I
 could use some help in understanding how to read and pass on the 
parameter through the QgsAfsSharedData object or in any other way that 
might be more correct.<br><br></div><div>On a side note, I am in the 
contributor meeting right now until lunch in case someone is here and 
can help with this face to face, it would be much appreciated. </div><div><br></div><div>On
 a second side note, sample service with other types of complex symbols 
for points, lines and polygons will also be much appreciated for testing
 purposes.</div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,<br><br></div>Dror Bogin, +972-50-3077338<br></div></div></div>