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

Cleanup iOS demo app - #5091

Merged
friedbunny merged 2 commits into
masterfrom
fb-iosapp-cleanup
May 23, 2016
Merged

friedbunny merged 2 commits into
masterfrom
fb-iosapp-cleanup

Conversation

@friedbunny

@friedbunny friedbunny commented May 21, 2016 •

Copy link
Copy Markdown
Contributor
  • Remove unsupported custom style layer example.
  • Only show debug log print/delete options if debug logging is enabled.

/cc @1ec5 @jfirebaugh

@friedbunny friedbunny added iOS Mapbox Maps SDK for iOS refactor labels May 21, 2016
@friedbunny friedbunny self-assigned this May 21, 2016
@1ec5

1ec5 commented May 21, 2016

Copy link
Copy Markdown
Contributor

👍

@friedbunny
friedbunny force-pushed the fb-iosapp-cleanup branch from 9fad042 to 72bc222 Compare May 23, 2016 14:37
@friedbunny

Copy link
Copy Markdown
Contributor Author

FF-merged and pushed this in master, but the ongoing GitHub outage means that it isn’t showing up yet.

@jfirebaugh

Copy link
Copy Markdown
Contributor

👍

@friedbunny
friedbunny merged commit 72bc222 into master May 23, 2016
@friedbunny
friedbunny deleted the fb-iosapp-cleanup branch May 23, 2016 17:02
1ec5 added a commit that referenced this pull request Nov 30, 2016
Reprised the demo removed from iosapp in #5091.
1ec5 added a commit that referenced this pull request Dec 7, 2016
Reprised the demo removed from iosapp in #5091.
1ec5 added a commit that referenced this pull request Dec 7, 2016
…7250)

* [ios, macos] Replaced custom style layer API with MGLOpenGLStyleLayer

Replaced the custom style layer API on MGLMapView with an equally unsupported MGLOpenGLStyleLayer API that nonetheless is consistent with the broader runtime styling API and is compatible with macOS.

Fixed an unrecognized selector crash when wrapping a layer of unrecognized type coming from mbgl.

* [macos] Added lime green layer demo to macosapp

Reprised the demo removed from iosapp in #5091.

* [ios, macos] Rationalized MGLOpenGLStyleLayer API

MGLStyle now strongly references any MGLOpenGLStyleLayer object that’s added to it, in order to prevent pointers from going stale and make it easy for layer drawing code to get more information about the map view. Replaced the MGLOpenGLStyleLayer callback blocks with overridable instance methods. Added internal documentation for each method. Subclassed MGLOpenGLStyleLayer as LimeGreenStyleLayer inside macosapp.

Consolidated -addToMapView: into -addToMapView:belowLayer: to ensure that MGLRedundantLayerException gets raised even if the layer is being inserted rather than added to the bottom of the stack.

* [core] Clarified that rendering happens on the main thread

* [ios, macos] Fixed removing and re-adding MGLOpenGLStyleLayer

Don’t allow index-based layer removal to circumvent -removeFromMapView:, which MGLOpenGLStyleLayer relies on to synchronize the style’s array of MGLOpenGLStyleLayers. When obtaining an MGLOpenGLStyleLayer, get the instance already added to the style instead of creating a new one to wrap the underlying CustomLayer.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

iOS Mapbox Maps SDK for iOS refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants