Hello GeoNet,
I wonder if it is possible to use my own polygon pattern for symbology on ArcGIS Online like points do. I have a set of standard pattern for land use, but they are not solid colors.
Ex:
And when I tried to pre-set the symbology before publishing the service online, those came out empty (hollow with no color) or solid black instead. Like this:
Any idea please?
Thank you!
Emily
Solved! Go to Solution.
Hi Emily,
Currently hatched symbolgy like your examples are not supported in features services that are hosted in ArcGIS Online - unfortunately I can't find any documentation on it but there is an idea you can vote on: https://community.esri.com/ideas/6678
If you have access to an ArcGIS Server, you could publish your layers to it - this retains the symbology. Then the layers can be added to your ArcGIS Online account.
Carmel
It is possible to apply line fill or marker fill symbology on a Hosted Feature Service by modifying the service definition at the item’s REST endpoint - these symbologies seem to be supported by the current web map specification, but are not built into the graphical user interface. This process is a bit of a workaround, but it is possible.
- picture markers (for points)
For example: Changing "type":"esriSFS","style":"esriSFSSolid” to "type":"esriSFS","style":"esriSFSCross” would apply a cross hatching symbology, and retain the existing fill color. It can be helpful to use a JSON formatter when filling in these attributes, like the “Pretty JSON” plugin for Sublime Text.
Hello. Your post really helps a lot of people. I thank you again! When I update the color RGBA and click the 'Update Service Definition' on the bottom, it doesn't update when I check the layer on webmap when adding it from the URL. When I go back to the Admin Update Service Definition page, the RGBA #s went back to original. Am I missing some step? Thank you.
Hi Emily,
Currently hatched symbolgy like your examples are not supported in features services that are hosted in ArcGIS Online - unfortunately I can't find any documentation on it but there is an idea you can vote on: https://community.esri.com/ideas/6678
If you have access to an ArcGIS Server, you could publish your layers to it - this retains the symbology. Then the layers can be added to your ArcGIS Online account.
Carmel
I see. Thank you Carmel.
It is possible to apply line fill or marker fill symbology on a Hosted Feature Service by modifying the service definition at the item’s REST endpoint - these symbologies seem to be supported by the current web map specification, but are not built into the graphical user interface. This process is a bit of a workaround, but it is possible.
- picture markers (for points)
For example: Changing "type":"esriSFS","style":"esriSFSSolid” to "type":"esriSFS","style":"esriSFSCross” would apply a cross hatching symbology, and retain the existing fill color. It can be helpful to use a JSON formatter when filling in these attributes, like the “Pretty JSON” plugin for Sublime Text.
This is great! Thank you very much!
Thank You for the info!
However, I see that your example explains how to change the fill style (and it works fine) - but is there a way how to change the color and width of the hatched lines?
Or the best way to apply that sort of a fill would be using a picture fill with transparency (how I have applied the hatched fill symbology so far)?
Thanks!
Thank you!
Yes, this worked great. The only thing I had to change was in navigating to the Admin REST endpoint. The direction to Replace "/" between the service name and FeatureServer to "." resulted in an error. Just inserting "admin/" was enough.
I had defined hatches in ArcMap, prior to publishing as a hosted service, which was supposed to have worked. Two of the three layers with hatching came into AGOL just fine, but the third came in as a solid. No idea why...but this solved the problem. Thanks again -
Janet
Hi William,
Thank you for your extremely thorough and helpful comment. I was able to code in the diagonal hatching pattern to a hosted feature layer via the Admin REST Endpoint (screenshot below) and it autofills the entire layer.
However, what I'd like to do is change the symbology of the map so that states vary between "esriSFSBackwardDiagonal," "esriSFSDiagonalCross," and "esriSFSSolid" based on different characteristics, as is shown in the screenshot of my ArcMap Desktop map below.
Do you know if there's a way for me to symbolize using hatching like this on AGOL? I tried creating three layers and coding the Feature Host layers separately (third screenshot below), but the symbology disappears when I merge the layers. I'd like them to be in one layer because of how the legend needs to be laid out.
Please let me know if there is a work-around for this!
Thanks,
Sophia
Yes, that should work as per my example above. Format your renderer JSON to use unique values and then specify each value and the symbology that goes with it. If you look at my renderer in the above example (go the feature service endpoint), it symbolizes unique values of the "Symbol" field. I would recommend pasting this render into a JSON parser/formatter and modifying it for your purposes.
Thank you for this great tip.
For those wanting to control the color of the hatching or want different symbology by attribute, you might want to add these tasks before Step 1 from the @DeVoe_William post.
Notes about Step 1.
Notes about Step 4.