Mapbox popup className option (#27068)

* added mapbox-gl popup className option

* added mapbox-gl popup className option test
This commit is contained in:
kukiel
2018-07-10 09:51:34 -07:00
committed by Ryan Cavanaugh
parent bc51af9960
commit 375fd64a08
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -464,6 +464,8 @@ declare namespace mapboxgl {
anchor?: Anchor;
offset?: number | PointLike | { [key: string]: PointLike; };
className?: string;
}
export interface Style {
+1 -1
View File
@@ -225,7 +225,7 @@ map.addLayer({
/**
* Popup
*/
var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]} })
var popup = new mapboxgl.Popup({closeOnClick: false, closeButton: true, anchor: 'top-right', offset: {'top': [0,0], 'bottom': [25,-50]}, className: 'custom-class' })
.setLngLat([-50, 50])
.setHTML('<h1>Hello World!</h1>')
.addTo(map);