Change icon of device location

535
3
02-16-2021 07:16 AM
GuilhermeFernandes
New Contributor

I started programming with android studio and arcgis not long ago, and I'm facing some problems related to ArcGis.

I implemented the following tutorial in my application: https://developers.arcgis.com/android/java/sample-code/display-device-location/

Everything worked perfectly, however I am not able to change the icon of the device location when I click in RECENTER for example. Can someone help me? It's probably something simple that I'm missing.

0 Kudos
3 Replies
RamaChintapalli
Esri Contributor

Hi GuilhermeFernandes,

You can change the default symbol for location display by setting a Custom Symbol.

https://developers.arcgis.com/android/api-reference/reference/com/esri/arcgisruntime/mapping/view/Lo...

 

Example:

SimpleMarkerSymbol defaultSms = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.TRIANGLE, Color.BLUE, 30);
        locationDisplay.setDefaultSymbol(defaultSms);

 

Thanks
Rama

0 Kudos
GuilhermeFernandes
New Contributor

Thanks Rama. Worked perfectly. Worked perfectly. In that case, you added a triangle to the location. Is it possible to add an image?

0 Kudos
MarkBaird
Esri Regular Contributor
0 Kudos