'How to remove MapBox logo from bottom left corner?
I'm embeding a MapBox map in my html page via mapbox.js script like so:
L.mapbox.accessToken = 'pk.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxx';
var map = L.mapbox.map('map', 'xxxxx.xxxxxxxx', {
zoomControl: false
});
This produces a map like this: http://s4.postimg.org/58m4aeb8d/mapbox.png
How do I remove "Mapbox" logo in the bottom left corner?
Solution 1:[1]
This worked for me:
.mapboxgl-ctrl-logo {
display: none !important;
}
Solution 2:[2]
This may violate the MapBox terms of service. Adding this css will remove it...
.mapbox-logo{
display: none !important;
}
Solution 3:[3]
As per https://www.mapbox.com/plans/. Unless you are on the Standard or Premium pricing plans then the MapBox logo is required according to the terms of service.
Solution 4:[4]
I've found this solution which keeps the mapbox wordmark(=logo) and text attributions in place but keeps them from interfering with the rest of the interface.
This solution does NOT violate the terms of service!
.leaflet-bottom, .leaflet-top {
z-index: 0 !important; // This is 1000 by default
position: absolute;
pointer-events: none;
}
Solution 5:[5]
In style.css paste this code
.mapbox-logo{ display: none; } .mapboxgl-ctrl-logo { display: none !important; } .mapbox-improve-map { display: none; } .mapboxgl-ctrl-compass { display: none; }
Is javascript file add this..
const map = new mapboxgl.Map({ container: this.mapContainer, style: 'mapbox://styles/mapbox/dark-v10', center: [this.state.lng, this.state.lat], zoom: this.state.zoom, attributionControl: false });
It's help you to hide terms of service
Solution 6:[6]
Simply add attributionControl: false, when creating object for map
const map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
attributionControl: false
});
Solution 7:[7]
In case you are using the Mapbox Static Images API, you can easily remove both the Mapbox logo and the OpenStreetMaps attribution by adding the following parameters to your source URL:
&attribution=false&logo=false
Example (replace xxx with your own access token):
https://api.mapbox.com/styles/v1/mapbox/outdoors-v11/static/-122.385,37.7175,12,0/300x300?access_token=xxx
Remember that you are still legally required to include proper attribution elsewhere on the webpage or document.
Solution 8:[8]
The Mapbox logo is a small image containing the stylized word "Mapbox". It typically resides on the bottom left corner of a map. While you may move the logo to a different corner of the map, we require the Mapbox logo to appear on our maps so that Mapbox and its maps get proper credit.
Solution 9:[9]
You can try this
@IBOutlet weak var mapView: MGLMapView!{
didSet{
mapView.styleURL = URL(string: "mapbox://styles/mapbox/dark-v10")
mapView.attributionButton.alpha = 0 // to remove info icon on right
mapView.logoView.isHidden = true // to remove mapBox logo on left
mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
