Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

heading compass on Android #644

Closed
incanus opened this issue Nov 25, 2014 · 13 comments
Closed

heading compass on Android #644

incanus opened this issue Nov 25, 2014 · 13 comments
Labels
Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS
Milestone

Comments

@incanus
Copy link
Contributor

incanus commented Nov 25, 2014

See #243

@incanus incanus added GL JS parity For feature parity with Mapbox GL JS Android Mapbox Maps SDK for Android labels Nov 25, 2014
@ljbade
Copy link
Contributor

ljbade commented Nov 26, 2014

This should be super easy.

@incanus Do you have a compass PNG I could use? What did you use for iOS?

@incanus
Copy link
Contributor Author

incanus commented Nov 26, 2014

@ljbade
Copy link
Contributor

ljbade commented Nov 27, 2014

@incanus do you have that compass as a vector file? Need to generate different sizes.

@ljbade
Copy link
Contributor

ljbade commented Nov 27, 2014

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.

@ljbade
Copy link
Contributor

ljbade commented Nov 27, 2014

@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?

ljbade pushed a commit that referenced this issue Nov 27, 2014
@incanus
Copy link
Contributor Author

incanus commented Dec 1, 2014

I would prefer the native Map object to call notifyMapChanges as it animates so I can sync properly with it.

Yeah, agreed that this would be better. resetNorth was a special case that existed in native before the iOS notification stuff and I kept it as-is. Ideally any pan/zoom/rotation change in the low-level map would propagate through the notification system.

This will be needed for other things such as wanting to have a marker that moves with map animation etc.

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.

@ljbade
Copy link
Contributor

ljbade commented Dec 1, 2014

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.

@ljbade
Copy link
Contributor

ljbade commented Dec 1, 2014

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.

@incanus
Copy link
Contributor Author

incanus commented Dec 1, 2014

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.

@ljbade
Copy link
Contributor

ljbade commented Dec 10, 2014

Need to make compass smaller.

@ljbade ljbade added this to the Android merge milestone Dec 17, 2014
@ljbade
Copy link
Contributor

ljbade commented Dec 18, 2014

@incanus I made the compass smaller. Are you happy with the size?

@incanus
Copy link
Contributor Author

incanus commented Dec 18, 2014

Not getting android-mason to build on OS X currently.

I think as close as we can get to something like this is what we want, for familiarity. Size, behavior, maybe even actual graphics. Relatively low priority for now, though.

@ljbade
Copy link
Contributor

ljbade commented Dec 18, 2014

OK I made it a bit smaller. Good enough for now.

@ljbade ljbade closed this as completed Dec 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android GL JS parity For feature parity with Mapbox GL JS
Projects
None yet
Development

No branches or pull requests

2 participants