Skip to content

Commit

Permalink
feat: add customAttribution option
Browse files Browse the repository at this point in the history
  • Loading branch information
mklopets committed Aug 30, 2018
1 parent 3cb4bdf commit cb35481
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const Map = ReactMapboxGl({
- **preserveDrawingBuffer** *(Default: `false`)*: `boolean`, [See mapbox doc](https://www.mapbox.com/mapbox-gl-js/api/#Map)
- **interactive** *(Default: `true`)*: `boolean` Set to `false` to disable interaction with the map.
- **attributionControl** *(Default: `true`)*: `boolean` Set to `false` to remove the attribution on the map.
- **customAttribution**: `string | string[]` String or strings to show in an AttributionControl. Only applicable if `attributionControl` option is set to `true`.
- **logoPosition** *(Default: `bottom-left`)*: `string` Set the position of the mapbox logo. Possible values:
- `top-left`
- `top-right`
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 @@ -75,7 +75,7 @@
"@types/enzyme": "2.8.8",
"@types/geojson": "^7946.0.4",
"@types/jest": "21.1.0",
"@types/mapbox-gl": "^0.47.1",
"@types/mapbox-gl": "^0.48.0",
"@types/node": "8.0.29",
"@types/prettier": "1.10.0",
"@types/prop-types": "15.5.2",
Expand Down
3 changes: 3 additions & 0 deletions src/map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export interface FactoryParameters {
interactive?: boolean;
dragRotate?: boolean;
attributionControl?: boolean;
customAttribution?: string | string[];
logoPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
renderWorldCopies?: boolean;
trackResize?: boolean;
Expand Down Expand Up @@ -127,6 +128,7 @@ const ReactMapboxFactory = ({
interactive = true,
dragRotate = true,
attributionControl = true,
customAttribution,
logoPosition = 'bottom-left',
renderWorldCopies = true,
trackResize = true,
Expand Down Expand Up @@ -222,6 +224,7 @@ const ReactMapboxFactory = ({
style,
scrollZoom,
attributionControl,
customAttribution,
interactive,
dragRotate,
renderWorldCopies,
Expand Down

0 comments on commit cb35481

Please sign in to comment.