AnsweredAssumed Answered

Any way to use local image file instead of embedded resource image for PictureMarkerSymbol?

Question asked by murdockpeter on Mar 10, 2018
Latest reply on Mar 12, 2018 by mnielsen-esristaff

All. First off, hello. (First time post. I've been using the sdk for a few months now and I just want to say thank you for a great set of tools.)

 

Scenario:

 

I've successfully used the examples for PictureMarkerSymbol Class  to show a icon at the location the user tapped on the map, but I would prefer to use local image instead of embedded resource for image files. Does anyone have an example of using PictureMarkerSymbol Class with a local image file they would be willing to share? I want the app to be able to use the appropriate size marker based upon resolution, and this use of embedded resource via the assembly I do not believe will auto resize based upon the iOS or Android screen resolution. Is there perhaps another stream method I'm just being naive about and could use in place of what is in the examples in the class api info?

 

(Sidenote: I was able to position the marker appropriately at the exact point of tapping by settings its height and width manually, and then using height/2 to position the bottom of the map marker right at the point of tapping. I'm happy with that result)

 

Long Story Short:

 

I've been able to place marker, but I don't know how to appropriately handle resizing the image (or using alternative images) based upon the screen size in Android and iOS. 

 

 

Thanks, Peter R.

Outcomes