You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Warn when using runtime styling with unversioned style methods #8971
The iOS and macOS SDKs should warn developers when they try to use unversioned style URLs with the runtime styling API.
Per #6301 (comment), the style URL factory methods on MGLStyle would append a query parameter like ?x-darwin-versioned=false to the returned URL. -[MGLMapView setStyleURL:] would then detect that parameter, strip it, and set an ivar. -[MGLStyle style] would log a warning to the console if the ivar is set; similarly, we’d log a warning to the console just before calling -[MGLMapViewDelegate mapView:didFinishLoadingStyle:]. The warning would be throttled to once per session, and perhaps we could make it debug-only.
There’s a risk that the developer is relying on the absolute URLs returned by these factory methods, and this change would cause those URLs to change. That could be a good argument against implementing this proposal and instead waiting for #6386, which would change the factory methods to return MGLStyle objects instead of NSURLs.
Activity
kkaefer commentedon May 12, 2017
I'm not too keen on an additional parameter because it means we'll have to special case it when requesting + storing to the database.
jfirebaugh commentedon May 12, 2017
Same, and I'm optimistic about having core support for #6386 soon.
1ec5 commentedon May 12, 2017
This would be completely transparent to mbgl because MGLMapView would strip the parameter before calling setStyleURL.
stale commentedon Nov 27, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.