React-native-mapbox-gl: [iOS/Android] Customize attribution position

Created on 17 Jan 2018  路  6Comments  路  Source: nitaliano/react-native-mapbox-gl

Hi,

The attribution is positioned on the bottom left on Android and positioned on the bottom right on iOS. It is a little detail, but I put some buttons over my map and they interfere with that inconsistent behavior.

Thanks!

Most helpful comment

I also noticed that when logoEnabled={false} on MapView, the attribution icon does not adjust to the corner.

Default:
logoenabled

logoEnabled={false}:
logoenabledfalse

react-native-mapbox-gl v6.1.0
Android v8.0.0

All 6 comments

fair enough I'll look into seeing how much control the Android SDK gives us with that icon

I also noticed that when logoEnabled={false} on MapView, the attribution icon does not adjust to the corner.

Default:
logoenabled

logoEnabled={false}:
logoenabledfalse

react-native-mapbox-gl v6.1.0
Android v8.0.0

@nitaliano Sorry to bother you, wondering if you have had a chance to look at this? Thanks.

I've taken a look through the docs and it looks as though this could be controlled using setAttributionMargins .

A new method can be created in the java which can then be triggered in the JS using _runNativeCommand, similar to the way that getPointInView() is set up.

Assuming the attribution is currently controlled by it's margins (may be incorrect) then we would have full control of the attribute positioning from within React Native.

Same issue here, would love to be able to update attribution positioning as our design renders it untappable. Anyone managed to move it?

Hey,

happy to accept PRs for this.

A potential solution: Completely disable watermarks on the native side and render these (using correct assets and specs provided by Mapbox) as RN views. That will allow us more control and easier cross-platform maintenance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vyankat70war picture vyankat70war  路  3Comments

madroneropaulo picture madroneropaulo  路  4Comments

lernerbot picture lernerbot  路  3Comments

Amalp picture Amalp  路  3Comments

kristfal picture kristfal  路  3Comments