Skip to content

Commit

Permalink
Markers log
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarrenechea committed Dec 11, 2023
1 parent 20c4e5e commit 000c10f
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions client/src/containers/map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ const DEFAULT_PROPS: CustomMapProps = {
maxZoom: 14,
};

// const FOG = {
// range: [0.5, 8],
// 'horizon-blend': 0.125,
// color: '#2a6981',
// 'high-color': '#0a2839',
// 'space-color': '#0a2839',
// 'star-intensity': 0.25,
// };
const FOG = {
range: [0.5, 8],
'horizon-blend': 0.125,
color: '#2a6981',
'high-color': '#0a2839',
'space-color': '#0a2839',
'star-intensity': 0.25,
};

export default function MapContainer() {
const { id, initialViewState, minZoom, maxZoom } = DEFAULT_PROPS;
Expand Down Expand Up @@ -153,9 +153,13 @@ export default function MapContainer() {
// );

const handleMapMove = useCallback((e: MapLayerMouseEvent) => {
console.log(e.features);

if (e.features?.length) {
const f = e.features[0];

console.log(f);

if (f.source === 'story-markers') {
setMarker({
...f,
Expand Down Expand Up @@ -208,7 +212,7 @@ export default function MapContainer() {
minZoom={minZoom}
maxZoom={maxZoom}
mapStyle={(isHomePage ? MAPBOX_STYLE_GLOBE : MAPBOX_STYLE_DEFAULT) as Style}
// fog={FOG}
fog={FOG}
interactiveLayerIds={layersInteractiveIds}
// onClick={handleMapClick}
onMouseMove={handleMapMove}
Expand Down

0 comments on commit 000c10f

Please sign in to comment.