Hi,
I have a vehicle graphic on the map, but when I rotate my device/map the rotation of the ArcGraphic is off. Is there a best practiced way to do this in swift?
thanks.
Solved! Go to Solution.
Aha. I think you're thinking of angleAlignment on AGSMarkerSymbol (guessing you're using AGSPictureMarkerSymbol which is a subclass). Set that to .map.
If you're using a renderer you can also use the rotationExpression. That way you can just update an attribute on each graphic as needed and the renderer will take care of everything else.
Can you explain your question a bit more please?
For example: Do you want the graphic's symbol to point in the direction that your device is pointing? Does the graphic represent your location, or that of some other vehicle?
Like an uber app for instance, I have the veichle geo rotation in degrees let's say its going west and then I rotate the map while the graphic is pointing west the graphics rotation will get messed up since the map isn't pointing north anymore. I thought I seen a way to tie the rotation to the map in documentation a long time ago but haven't been able to find it since.
Aha. I think you're thinking of angleAlignment on AGSMarkerSymbol (guessing you're using AGSPictureMarkerSymbol which is a subclass). Set that to .map.
If you're using a renderer you can also use the rotationExpression. That way you can just update an attribute on each graphic as needed and the renderer will take care of everything else.