问题
I have made application where we can calculate current location in extention app and I would like to show it at watch. How to do this? There is a methods only to show pin with different color.
回答1:
If you have the coordinates for the location you can use - (void)addAnnotation (CLLocationCoordinate2D)location withImage:(UIImage *)image centerOffset:(CGPoint)offset
on WKInterfaceMap. Pass in the location for the first parameter and pass in a UIImage for the pin that you want to show for the current location. You will also want to be sure and call setVisibleMapRect
so that the map shows the location.
来源:https://stackoverflow.com/questions/27425336/watchkit-maps-show-current-location