Skip to content

Commit

Permalink
fix: omit map prop from markers (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-ka authored Apr 10, 2024
1 parent 1e65f86 commit 8a38acf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/advanced-marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ type AdvancedMarkerEventProps = {
};

export type AdvancedMarkerProps = PropsWithChildren<
Omit<google.maps.marker.AdvancedMarkerElementOptions, 'gmpDraggable'> &
Omit<
google.maps.marker.AdvancedMarkerElementOptions,
'gmpDraggable' | 'map'
> &
AdvancedMarkerEventProps & {
/**
* className to add a class to the advanced marker element
Expand Down
3 changes: 2 additions & 1 deletion src/components/marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ type MarkerEventProps = {
onMouseOut?: (e: google.maps.MapMouseEvent) => void;
};

export type MarkerProps = google.maps.MarkerOptions & MarkerEventProps;
export type MarkerProps = Omit<google.maps.MarkerOptions, 'map'> &
MarkerEventProps;

export type MarkerRef = Ref<google.maps.Marker | null>;

Expand Down

0 comments on commit 8a38acf

Please sign in to comment.