Mapbox iOS move attribution Button

mapbox attribution
mglmapboxmetricsenabledsettingshowninapp
mapbox information

I'm using the mapbox SDK and I need to show their logo watermark and their attribution mark. I can move them though, so I want to move the attribution button from the bottom right to bottom left next to the logo watermark.

I tried the following code but it did not work:

func mapViewWillStartLoadingMap(_ mapView: MGLMapView) {
    mapView.attributionButton.frame.offsetBy(dx: -200.0, dy: 0)
}

This is how it looks like:

mapView.attributionButton.contentHorizontalAlignment = .left
mapView.attributionButton.frame.size = CGSize(width:   self.mapView.frame.size.width - 120, height: 25)

you can also hide attribution Button as follow:

mapView.attributionButton.alpha = 0

proper attribution, Hi, The attribution is positioned on the bottom left on Android and positioned on It is a little detail, but I put some buttons over my map and they interfere with react-native-mapbox-gl v6.1.0 Anyone managed to move it? If you must remove the button for your app, then you would have to. Modify the source and remove the _attributionButton; recompile the iOS SDK and keep up with code changes from mapbox-gl-native (thereby losing any advantages of CocoaPods for Mapbox, if you use it). Then add in a custom User Interface for copyright and attribution.

I tried solutions like Harshal's but couldn't get that to work. Here's what worked for me (placing the attribution button near upper left). (Code added to viewDidLoad())

self.view.addConstraints([
NSLayoutConstraint(item: mapView.attributionButton, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .width, multiplier: 1.0, constant: 25),
NSLayoutConstraint(item: mapView.attributionButton, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .height, multiplier: 1.0, constant: 25),
NSLayoutConstraint(item: mapView.attributionButton, attribute: .left, relatedBy: .equal, toItem: self.view, attribute: .left, multiplier: 1.0, constant: 72),
NSLayoutConstraint(item: mapView.attributionButton, attribute: .top, relatedBy: .equal, toItem: self.view, attribute: .top, multiplier: 1.0, constant: 24),
])

Allow watermark and info button to be moved (iOS) · Issue #1781 , I'm using the mapbox SDK and I need to show their logo watermark and their attribution mark. I can move them though, so I want to move the attribution button​  Styles (11) Add a default marker Add an animated icon to the map Add a generated icon to the map Add a stretchable image to the map Generate and add a missing icon to the map Add an icon to the map Display a map with a custom style Render world copies Display a satellite map Change a map's style Display a map Layers (32) Display buildings in 3D

Take a look at scaleBarPosition in MGLMapView

MapBox added the ability to do this in 4.3.0 https://github.com/mapbox/mapbox-gl-native/commit/60ceac5efc3d77199f773f08400fe1d53d5a1b90

[iOS/Android] Customize attribution position · Issue #961 · nitaliano , (#9390); The Improve This Map button in the attribution action sheet now leads of the Mapbox macOS SDK corresponds to version 3.5.2 of the Mapbox iOS SDK. (#7724); Fixed a crash that occurred when moving a window containing an  The Mapbox Maps SDK for iOS and the Mapbox Maps SDK for Android are open-source tools for adding Mapbox maps to mobile applications. These SDKs leverage Mapbox's open source OpenGL-based renderer, Mapbox GL Native, and support a full suite of dynamic styling features and interactivity.

changelog, Introduction; The map's view; Camera position; Moving the camera Like Google Maps on the web, the Maps SDK for iOS represents the world's surface (a​  Partially addresses #9597, where subviews of MGLMapView have their custom tint colors unnecessarily overridden. A full fix for that issue would be a breaking change, so this only attempts to fix the attribution button. UIButton can be relied on to automatically update its tint to match its parent view, if it still inherits a tint from that parent.

Camera and View | Maps SDK for iOS, Can anybody help me with moving the Mapbox logo and attribution to the top of the map? Does anyone here know what version of iOS SDK and Android SDK the Anyone know how to implement a custom Mapbox Studio map to a react native app? Is there any way to adjust the position of the mapbox logo / (i) button? The dynamic framework has been our recommended path since Mapbox iOS SDK v3.1.0 (released February 2016) and developers should migrate to it as soon as possible, if they haven’t already. UIActionSheet and UIAlertView remain in use for the attribution button, despite being deprecated in favor of UIAlertController.

react-native-mapbox-gl/Lobby, be used in combination inside your Mapview in the layout XML to move around the Mapbox logo and attribution button. If you want to handle this dynamically,  Mapbox Studio allows you to create completely custom map styles. When designing your style, consider the context in which your application shows the style. There are many considerations related to the mobile experience and iOS specifically that may not be obvious when designing your style in Mapbox Studio on the Web.

Comments
  • I do not want to hide it. It's not allowed by mapbox. Just want to move it.
  • let me check @Mike