Skip to content

Commit

Permalink
fix(attribution): show terrain texture attribution (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
mspivak-actionengine authored Feb 20, 2024
1 parent 2e313fa commit 21bf82d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/components/deck-gl-wrapper/deck-gl-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ import {
} from "../../redux/slices/base-maps-slice";
import { colorizeTile } from "../../utils/colorize-tile";
import { filterTile } from "../../utils/tiles-filtering/filter-tile";
import styled from "styled-components";

const WrapperAttributionContainer = styled.div`
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: end;
align-items: end;
`;

const AttributionContainer = styled.div`
position: absolute;
display: flex;
flex-direction: column;
margin: 8px;
`;

const TRANSITION_DURAITON = 4000;
const INITIAL_VIEW_STATE = {
Expand Down Expand Up @@ -805,6 +824,19 @@ export const DeckGlWrapper = ({
/>
</View>
)}
{showTerrain && (
<WrapperAttributionContainer>
<AttributionContainer>
<div>
&copy;
<a href="http://www.openstreetmap.org/copyright/" target="_blank">
OpenStreetMap
</a>{" "}
contributors
</div>
</AttributionContainer>
</WrapperAttributionContainer>
)}
</DeckGL>
);
};

0 comments on commit 21bf82d

Please sign in to comment.