Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add antialias support #777

Merged
merged 1 commit into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const Map = ReactMapboxGl({
* **refreshExpiredTiles** _(Default: `true`)_: `boolean` If `false` , the map won't attempt to re-request tiles once they expire per their HTTP cacheControl / expires headers.
* **failIfMajorPerformanceCaveat** _(Default: `false`)_: `boolean` If `true` , map creation will fail if the performance of Mapbox GL JS would be dramatically worse than expected (i.e. a software renderer would be used).
* **bearingSnap** _(Default: `7`)_: `number` The threshold, measured in degrees, that determines when the map's bearing (rotation) will snap to north. For example, with a bearingSnap of 7, if the user rotates the map within 7 degrees of north, the map will automatically snap to exact north.
* **antialias** _(Default: `false`)_: `boolean` 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.

### Component Properties

Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@types/enzyme-adapter-react-16": "^1.0.3",
"@types/geojson": "7946.0.4",
"@types/jest": "23.3.5",
"@types/mapbox-gl": "^0.51.6",
"@types/mapbox-gl": "^0.54.3",
"@types/node": "8.0.29",
"@types/prettier": "1.10.0",
"@types/prop-types": "15.5.6",
Expand Down
3 changes: 3 additions & 0 deletions src/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export interface FactoryParameters {
bearingSnap?: number;
injectCSS?: boolean;
transformRequest?: RequestTransformFunction;
antialias?: boolean;
}

// Satisfy typescript pitfall with defaultProps
Expand Down Expand Up @@ -141,6 +142,7 @@ const ReactMapboxFactory = ({
failIfMajorPerformanceCaveat = false,
bearingSnap = 7,
injectCSS = true,
antialias = false,
transformRequest
}: FactoryParameters) => {
if (injectCSS) {
Expand Down Expand Up @@ -235,6 +237,7 @@ const ReactMapboxFactory = ({
logoPosition,
bearingSnap,
failIfMajorPerformanceCaveat,
antialias,
transformRequest
};

Expand Down