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

legacy raster mapID API #1844

Closed
wants to merge 2 commits into from
Closed

legacy raster mapID API #1844

wants to merge 2 commits into from

Conversation

incanus
Copy link
Contributor

@incanus incanus commented Jul 7, 2015

For your perusal and consideration. When #963 lands, this will be trivially doable.

[self.mapView setRasterMapID:@"examples.map-pgygbwdm"];

Only concerns are around interference with styleID, such as in IB. I don't want to overthink this, and would punt at the earliest sign of complication, but if this can stand like this, it's an easy win.

/cc @1ec5 @friedbunny

@incanus incanus added feature GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS labels Jul 7, 2015
@incanus incanus added this to the iOS Beta 3 milestone Jul 7, 2015
@incanus
Copy link
Contributor Author

incanus commented Jul 7, 2015

img_0653

@1ec5
Copy link
Contributor

1ec5 commented Jul 8, 2015

Great idea. This will address plenty of confusion, some of which we're already seeing today. What if we treat any style ID starting with "raster/" as a raster style that we can then synthesize on the fly? We could do that at the mbgl level and catch both the style ID and style URL interfaces in one go.

@incanus
Copy link
Contributor Author

incanus commented Jul 8, 2015

Hmm, putting magic tokens in feels complex to me. I'd rather keep it in a separate API that we can point people to, but that is 1) clearly labeled in a sort of deprecating, maybe-don't-really-use-this way, and 2) Can be removed in future with a more clean break.

@1ec5
Copy link
Contributor

1ec5 commented Jul 8, 2015

In that case, maybe we just show how to create one of these compatibility styles in help documents?

@incanus
Copy link
Contributor Author

incanus commented Jul 8, 2015

In that case, maybe we just show how to create one of these compatibility styles in help documents?

We could do that as well, but the point in this PR is to not have to create a style, just pass a mapID that you were using in our raster tools.

@incanus incanus self-assigned this Jul 8, 2015
@incanus incanus removed this from the iOS Beta 3 milestone Jul 8, 2015
@1ec5
Copy link
Contributor

1ec5 commented Jul 14, 2015

I’m only in favor of this approach if we consider it a permanent part of the MGLMapView feature set. However, if the idea is to provide a temporary migration path for developers on the existing raster tools, I don’t think the added complexity is worth it.

The complexity would come in the form of a third way to populate an MGLMapView with content. (The PR doesn’t add an initializer, but presumably that would be necessary.) All three properties are mutually exclusive yet available at the same time. Simplifying initialization in #1184 made it possible to ensure KVO compliance, coherent setup instructions (as opposed to a choose-your-adventure), and minimal opportunity for race conditions, and I think we should be wary of pulling back that simplification.

@friedbunny
Copy link
Contributor

We show devs how to make their own raster JSON shim here: https://www.mapbox.com/ios-sdk/examples/raster-styles/

@jfirebaugh
Copy link
Contributor

I like that example. I think we should go with a GL style-based approach, like that does, and not bake legacy support into the SDK like this.

@jfirebaugh jfirebaugh closed this Sep 16, 2015
@jfirebaugh jfirebaugh deleted the 836-legacy-raster-mapid branch September 16, 2015 20:27
@incanus
Copy link
Contributor Author

incanus commented Sep 16, 2015

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants