AGSMapView displaying gps location

2781
3
03-07-2013 12:08 PM
JeffJackson
New Contributor III
When you don't include the arcgis.bundle, you get a clean blue marker symbol when you display the gps location on the map. Is it possible to access that symbol or replace it?

Thanks,
Jeff
0 Kudos
3 Replies
DanaMaher
Occasional Contributor
Is it possible to access that symbol or replace it?
Jeff


I believe this would be accomplished with the customViewForLocationDisplay or imageForLocationDisplay methods of the AGSLocationDisplayInfoTemplateDelegate protocol. Every AGSMapView instance has an AGSLocationDisplay, called locationDisplay, which has an AGSLocationDisplayInfoTemplateDelegate. It looks like you can easily write your own implementation of the AGSLocationDisplayInfoTemplateDelegate protocol and assign it to locationDisplay.
0 Kudos
JeffJackson
New Contributor III
Actually, the AGSLocationDisplayInfoTemplateDelegate lets you customize the callout that is displayed when you tap the location indicator on the map. I would like to customize the location indicator itself.

Jeff
0 Kudos
DanaMaher
Occasional Contributor
Actually, the AGSLocationDisplayInfoTemplateDelegate lets you customize the callout that is displayed when you tap the location indicator on the map. I would like to customize the location indicator itself.

Jeff


My mistake. If you want to replace the default indicator graphics, you could move a copy of the bundle into your app directory, point to that bundle, open it with ctrl-click->Show Package Contents, and then replace the LocationDisplay___.png files with different graphics. I think that clean blue marker symbol is drawn on the fly if the LocationDisplay graphics / the bundle cannot be accessed, so the code for that drawing would be buried in the SDK.
0 Kudos