Skip to content

Commit

Permalink
Merge pull request #121 from Vizzuality/AF-146-map-points
Browse files Browse the repository at this point in the history
afocos offices layer
  • Loading branch information
mluena authored Apr 23, 2024
2 parents 68bd230 + 266cf1c commit 12804d8
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
4 changes: 4 additions & 0 deletions client/public/images/pin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 32 additions & 1 deletion client/src/containers/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import { useCallback, useMemo, useState } from 'react';

import { LngLatBoundsLike, MapLayerMouseEvent, useMap } from 'react-map-gl';
import { LngLatBoundsLike, MapLayerMouseEvent, useMap, Marker } from 'react-map-gl';

import dynamic from 'next/dynamic';
import Image from 'next/image';
import { useParams, usePathname, useRouter } from 'next/navigation';

import bbox from '@turf/bbox';
Expand All @@ -26,6 +27,7 @@ import Controls from '@/components/map/controls';
import SettingsControl from '@/components/map/controls/settings';
import ZoomControl from '@/components/map/controls/zoom';
import { CustomMapProps } from '@/components/map/types';
import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip';

const LayerManager = dynamic(() => import('@/containers/map/layer-manager'), {
ssr: false,
Expand Down Expand Up @@ -290,6 +292,35 @@ export default function MapContainer() {
<LayerManager />

<MapSettingsManager />
<Marker latitude={17.143622599404814} longitude={96.0012404711645} anchor="bottom">
<Tooltip delayDuration={100}>
<TooltipTrigger className="flex items-center justify-center rounded-full p-2">
<Image src="/images/pin.svg" alt="AFoCO RETC" width={19.76} height={24.25} />
</TooltipTrigger>

<TooltipContent className="max-w-[200px] p-2">
<p className="text-xs text-yellow-900">AFoCO RETC</p>
</TooltipContent>
</Tooltip>
</Marker>
<Marker latitude={37.52292545640524} longitude={126.92946965767372} anchor="bottom">
<Tooltip delayDuration={100}>
<TooltipTrigger className="flex items-center justify-center rounded-full p-2">
<Image
src="/images/pin.svg"
alt="Asian Forest Cooperation Organization (AFoCO)"
width={19.76}
height={24.25}
/>{' '}
</TooltipTrigger>

<TooltipContent className="max-w-[200px] p-2">
<p className="text-xs text-yellow-900">
Asian Forest Cooperation Organization (AFoCO)
</p>
</TooltipContent>
</Tooltip>
</Marker>

<Legend />

Expand Down

0 comments on commit 12804d8

Please sign in to comment.