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 has been archived by the owner on Aug 8, 2023. It is now read-only.
#6309 is adding the ability to customize the meaning of mapbox: URLs to mbgl. We should offer a convenient way for the developer to modify the API hostname. Two options:
Add a hostname property to MGLOfflineStorage whose setter calls mbgl::DefaultFileSource::setAPIBaseURL().
Have MGLOfflineStorage call mbgl::DefaultFileSource::setAPIBaseURL() automatically based on an MGLMapboxAPIHostname user default.
Same as (2), but as an Info.plist entry.
I prefer either (2) or (3) because MGLOfflineStorage is largely asynchronous and therefore easy to use incorrectly.
It’d be nice to call this option a “hostname” for consistency with the Mapbox Swift libraries’ existing API hostname options. However, “base URL” would be more correct since it looks like you can provide an arbitrary path and scheme in addition to the hostname. MGLAPIClient already has support for a MGLTelemetryTestServerURL user default that defaults to MGLAPIClientBaseURL, so I guess we can follow that naming scheme.
Also, if we end up making this a user default, we should provide constants for api.mapbox.com and any alternative hostnames we might need to support publicly.
#6309 is adding the ability to customize the meaning of mapbox: URLs to mbgl. We should offer a convenient way for the developer to modify the API hostname. Two options:
hostname
property to MGLOfflineStorage whose setter callsmbgl::DefaultFileSource::setAPIBaseURL()
.mbgl::DefaultFileSource::setAPIBaseURL()
automatically based on anMGLMapboxAPIHostname
user default.I prefer either (2) or (3) because MGLOfflineStorage is largely asynchronous and therefore easy to use incorrectly.
It’d be nice to call this option a “hostname” for consistency with the Mapbox Swift libraries’ existing API hostname options. However, “base URL” would be more correct since it looks like you can provide an arbitrary path and scheme in addition to the hostname. MGLAPIClient already has support for a
MGLTelemetryTestServerURL
user default that defaults toMGLAPIClientBaseURL
, so I guess we can follow that naming scheme./cc @boundsj @tobrun
The text was updated successfully, but these errors were encountered: