Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm planning the following deprecations in v10. So we can remove them in after we've released v10 final:

Deprecated implementations MapLibre and MapboxGL

MapLibre and classic MapoxGL implementations will be deprecated. Still usable to aid people in conversions, but will be removed after 10.0 is released.

Images

using images/urls directly in styles

Deprecated:

<SymbolLayer style={{iconImage: require('foo.png')}} />
<SymbolLayer style={{iconImage: 'https://download.samplelib.com/png/sample-red-100x75.png'}} />

Replacement:

<Images images={{foo: require('foo.png')}} />
<SymbolLayer style={{iconImage: 'foo'}}/>
<Images images={{foo: 'sample-red-100x75.png'}} />
<SymbolLayer style={{'sample-red-100x75':   'https://download.samplelib.com/png/sample-red-100x75.png'}}/>

Why?

Required a lot of extra code, and it's esp. an issue since image loading is async. The alternative is more flexible.

onRegionDidChange => onMapIdle , onRegionIsChanging => `onCameraChanged

will be deprecated, in v10 you can use onMapIdle and onCameraChanged names are much better.

Remove children support in SymbolLayer

Deprecated:

<SymbolLayer><View style={{backgroundColor:'red', width: 20, height: 20, borderRadius: 20}} /></SymbolLayer>

Replacement:

<SymbolLayer style={{iconImage:'foo'}} />
<Images>
  <Image key="foo">
    <View style={{backgroundColor:'red', width: 20, height: 20, borderRadius: 20}} />
  </Image>
</Images>

Why?

As this is not supported iOS, also the alternative is more flexible.

Implicit reference to existing source/layers:

Deprecated:

<Mapbox.FillLayer id="building" style={{ visibility }} />
<Mapbox.LineLayer id="building-outline" style={{ visibility }} />

<Mapbox.VectorSource id="building" onPress={...} />

Replacement:

<Mapbox.FillLayer id="building" existing style={{ visibility }} />
<Mapbox.LineLayer id="building-outline" existing style={{ visibility }} />

<Mapbox.VectorSource id="building" existing onPress={...} />

Why:

Vectors/Sources needs to wait for the id to appear if they marked as existing. Regular layers don't have to wait.

You must be logged in to vote

Replies: 1 comment · 1 reply

Comment options

@mfazekas I guess you are missing the existing on the sources recommendation?

You must be logged in to vote
1 reply
@mfazekas
Comment options

mfazekas Mar 15, 2023
Maintainer Author

@KiwiKilian yep, thanks addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.