From 63b8cdc3a3fbc5fd5205601210ae468ff2753172 Mon Sep 17 00:00:00 2001 From: alecf Date: Fri, 23 Aug 2019 14:25:12 -0700 Subject: [PATCH] [mapbox-gl] Add `antialias` property to MapboxOptions (take 2) (#37878) * Add `antialias` property to MapboxOptions * add a test --- types/mapbox-gl/index.d.ts | 6 ++++++ types/mapbox-gl/mapbox-gl-tests.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/types/mapbox-gl/index.d.ts b/types/mapbox-gl/index.d.ts index 87f39c513d..1654ddcb60 100644 --- a/types/mapbox-gl/index.d.ts +++ b/types/mapbox-gl/index.d.ts @@ -250,6 +250,12 @@ declare namespace mapboxgl { } export interface MapboxOptions { + /** + * If true, the gl context will be created with MSA antialiasing, which can be useful for antialiasing custom layers. + * This is false by default as a performance optimization. + */ + antialias?: boolean; + /** If true, an attribution control will be added to the map. */ attributionControl?: boolean; diff --git a/types/mapbox-gl/mapbox-gl-tests.ts b/types/mapbox-gl/mapbox-gl-tests.ts index d9a731c730..fda8083d88 100644 --- a/types/mapbox-gl/mapbox-gl-tests.ts +++ b/types/mapbox-gl/mapbox-gl-tests.ts @@ -31,6 +31,7 @@ let map = new mapboxgl.Map({ boxZoom: true, dragRotate: false, dragPan: true, + antialias: true, }); /**