mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

bundledStyleNames inconsistency

Open picciano opened this issue 11 years ago • 4 comments

In MGLMapView.mm, the bundledStyleNames method returns an array of filename with the .json extension included. However, the useBundledStyleNamed:(NSString *)styleName expects a filename without the extension.

This makes getting a list of names, selecting one, and call useBundledStyleNamed: more difficult than it needs to be.

I would be happy to make the change, if provided with direction on either including or excluding the filename extension.

picciano avatar Mar 10 '15 17:03 picciano

Related, but styles for iOS are being loaded from the .app "styles" directory, rather than the MapboxGL.bundle file. The file in MapboxGL.bundle do not appear to be used at all.

picciano avatar Mar 10 '15 17:03 picciano

Good call on both points. Re: your question, I think we should provide strings w/o the .json extension.

incanus avatar Mar 11 '15 18:03 incanus

Here is a pull request that removes the file extensions from the bundledStyleNames method. https://github.com/mapbox/mapbox-gl-native/pull/980/files

picciano avatar Mar 11 '15 22:03 picciano

Fixed in 28e28934c74b0f8668020de03caf61d65a9c9842 and 4c7939b96eddb53f1700edfaea7abe1fa5b0e886.

1ec5 avatar Mar 12 '15 16:03 1ec5