Skip to content

Commit

Permalink
Remove area marks #1058 (#1061)
Browse files Browse the repository at this point in the history
chore: remove child area markers
  • Loading branch information
Ali7040 authored Jan 6, 2024
1 parent 62d970c commit d528025
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/components/area/areaMap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'
import * as React from 'react'
import { Map, Marker, ScaleControl, FullscreenControl, LngLatBoundsLike, MapboxMap } from 'react-map-gl'
import { Map, ScaleControl, FullscreenControl, LngLatBoundsLike, MapboxMap } from 'react-map-gl'
import dynamic from 'next/dynamic'
import { AreaMetadataType, AreaType } from '../../js/types'
import { MAP_STYLES } from '../maps/BaseMap'
Expand Down Expand Up @@ -79,34 +79,6 @@ export default function AreaMap (props: AreaMapProps): JSX.Element {
mapStyle={MAP_STYLES.light}
cooperativeGestures
>
{props.subAreas.map((subArea) => (
<Marker
style={{ zIndex: subArea.uuid === props.focused ? 100 : 0 }}
key={subArea.uuid}
longitude={subArea.metadata.lng}
latitude={subArea.metadata.lat}
anchor='bottom'
>
<div className={`rounded shadow transition text-xs px-1 font-bold
${subArea.uuid === props.focused ? 'bg-green-500 text-white scale-125' : ' bg-white'}
${subArea.uuid === props.selected ? 'bg-violet-500 text-white scale-125' : ' bg-white'}`}
>
{subArea.areaName}
</div>
</Marker>
))}

<Marker
style={{ zIndex: 1 }}
longitude={props.area.metadata.lng}
latitude={props.area.metadata.lat}
anchor='bottom'
>
<div className='rounded shadow transition text-md px-1 font-bold bg-violet-500 text-white scale-125 z-index-1'>
{props.area.areaName}
</div>
</Marker>

<ScaleControl />
<FullscreenControl />
</Map>
Expand Down

0 comments on commit d528025

Please sign in to comment.