Select to view content in your preferred language

Map viewer: possible to specify anchor for uploaded feature symbol?

925
5
Jump to solution
03-03-2023 07:10 AM
MartinRust
Emerging Contributor

Hi,

in the map viewer I've configured a feature layer to use an uploaded (custom) symbol for features.

This symbol resembles a flag pole with flag. Thus the symbol's anchor should be on the bottom left corner (flag pole base), rather than the center.

I'm aware I could work around this by adding enough transparent margin to the bottom and left side of the PNG file so that the flag pole base becomes the center of the image.

But it would be better if I could explicitly specify the position of the anchor in the image - is this possible? If not on the web UI, using the Python API would be fine too.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor

this is currently not possible to set anchor points on symbols in Map Viewer.  You would have to alter the web map JSON written out. 

https://developers.arcgis.com/web-map-specification/objects/esriPMS_symbol/

View solution in original post

5 Replies
RussRoberts
Esri Notable Contributor

this is currently not possible to set anchor points on symbols in Map Viewer.  You would have to alter the web map JSON written out. 

https://developers.arcgis.com/web-map-specification/objects/esriPMS_symbol/

JayLarsen
Frequent Contributor

Thanks for this.

So, normally the anchor would be  the center of the x by y pixel bounding box?

To "cheat" it into where you want to be, add blank space to the bottom so that the new bounding box anchor point is where you want it?

I've wondered about this for years...didn't know the proper term to ask!

Thanks!

0 Kudos
RussRoberts
Esri Notable Contributor

Yup its captured at the center of the image.

 

Yup what you are describing is covered towards the end of this blog:

https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/using-images-as-custom-point-symbols...

JayLarsen
Frequent Contributor

Great article.  Covers the exact thing! Surprised to see it so recent...I've been wondering about this for years.

Thanks!

😁

0 Kudos
MartinRust
Emerging Contributor

yes. To be precise, not "blank", but transparent is what it's called in most drawing applications 😉