AGSPictureMarkerSymbol from programatic images have the wrong size

1677
2
03-22-2017 11:06 PM
marius
by
New Contributor III

Hello,

While trying to migrate some code from ArcGIS 10.2.5 to ArcGIS 100, I've noticed some AGSPictureMarkerSymbol changes. When creating a AGSPictureMarkerSymbol with a local asset, it takes into consideration the image size (e.g. if @2x images are provided, the symbol is using that).

However, when using programatic images (e.g. UIViews screenshots), the supplied image is treated as @1x image. On iPad 2, it's rendered at 1x, on iPad Air 2s it's rendered at 2x.

The old SDK (and Apple's UIKit) is treating the UIView "screenshot" as "fit for current size", e.g. the image is rendered at the same relative size (1x or 2x).

See attached screenshots (please ignore E66).

Thank you,
Marius

Tags (1)
0 Kudos
2 Replies
MarkDostal
Esri Contributor

Marius,

Thank you for your question!  This is something that we are aware of and are working on.  There is a workaround: if you set the size on the AGSPictureMarkerSymbol when you are using your programmatic assets, the size will be consistent on different resolution devices.  The problem occurs when you let the size of the symbol be determined by the image; if the image scale is not consistent with the screen scale you run into problems.

marius
by
New Contributor III

Thanks Mark, that trick solved the size issue :-).

0 Kudos