Skip to content

Commit

Permalink
CDD-2363: Added in the UKHSA image overlay onto map
Browse files Browse the repository at this point in the history
  • Loading branch information
luketowell committed Dec 6, 2024
1 parent 7850266 commit fb8ffc5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/app/components/ui/ukhsa/Map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { AttributionControl } from './shared/controls/AttributionControl'
import { KeyControl } from './shared/controls/KeyControl'
import { ZoomControl } from './shared/controls/ZoomControl'
import { useMapRef } from './shared/hooks/useMapRef'
import { UKHSALogoLayer } from './shared/layers/UKHSALogoLayer'

interface DefaultOptions extends ComponentProps<typeof MapContainer> {
zoomControlPosition: ControlPosition
Expand Down Expand Up @@ -55,6 +56,7 @@ const Map = ({
className={clsx('relative h-screen overflow-hidden ukhsa-focus', className)}
zoomControl={false}
>
<UKHSALogoLayer position="topright" />
<KeyControl position="bottomleft" keyItems={['Green', 'Yellow', 'Amber', 'Red']} />
<AttributionControl position={attributionControlPosition} />
<ZoomControl position={zoomControlPosition} />
Expand Down
21 changes: 21 additions & 0 deletions src/app/components/ui/ukhsa/Map/shared/layers/UKHSALogoLayer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use client'

import { ControlPosition } from 'leaflet'
import Image from 'next/image'
import logo from 'public/assets/images/UKHSA_Lesser_Arms_Stacked_RGB.png'
import Control from 'react-leaflet-custom-control'

interface LogoLayerProps {
position: ControlPosition
}

export function UKHSALogoLayer({ position }: LogoLayerProps) {
return (
<Control position={position}>
<div>
<Image src={logo} height="125" alt="Logo for the UK Health Security Agency" />
</div>
</Control>
)
}
;``

0 comments on commit fb8ffc5

Please sign in to comment.