-
Notifications
You must be signed in to change notification settings - Fork 1.3k
heading compass on Android #644
Comments
This should be super easy. @incanus Do you have a compass PNG I could use? What did you use for iOS? |
All the SDK-related resources are here: https://github.com/mapbox/mapbox-gl-cocoa/tree/master/mapbox-gl-cocoa/Resources Other ones you may see in the test app are here: https://github.com/mapbox/mapbox-gl-cocoa/tree/master/app/img |
@incanus do you have that compass as a vector file? Need to generate different sizes. |
I will have to add this to the demo app, but not the MapView itself. The reason is that I would need to modify the native code to use GL to render the compass into the surface. That would require all sorts of stuff such as loading the image, picking the correct image resolution etc. Also leaving it up to the app allows developers freedom to change the compass image to match the look of their app. |
@incanus I have implemented the compass. Only problem is that the compass does not rotate with the map animation of resetNorth(). I see you added a workaround at https://github.com/mapbox/mapbox-gl-cocoa/blob/master/mapbox-gl-cocoa/MGLMapView.mm#L753 I would prefer the native Map object to call notifyMapChanges as it animates so I can sync properly with it. This will be needed for other things such as wanting to have a marker that moves with map animation etc. Should I create an issue for that? |
Yeah, agreed that this would be better.
I doubt we'd be doing this external to the GL, right? Otherwise we'd be implementing markers on each platform. See #507 for the encapsulation of the goal for cross-platform above-basemap data layers. |
|
Yeah youre right, but I was getting more at a developer wanting to some custom UI stuff. |
Yeah bound up in #507 is the idea of bringing arbitrary client-side imagery into the sprite and styling markers with them. In fact, eventually markers could be animated and not static imagery — on iOS MapKit they are full-on views. |
Need to make compass smaller. |
@incanus I made the compass smaller. Are you happy with the size? |
OK I made it a bit smaller. Good enough for now. |
See #243
The text was updated successfully, but these errors were encountered: