Skip to content

Commit 22fbe35

Browse files
thorwebdevchrisgervang
authored andcommitted
Update marker.md (#2367)
1 parent f9ac790 commit 22fbe35

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/api-reference/marker.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,71 +63,71 @@ If `Marker` is mounted with child components, then its content will be rendered
6363

6464
### Reactive Properties
6565

66-
#### `draggable`: boolean {#draggable}
66+
#### `draggable`: boolean {#draggable}
6767

6868
Default: `false`
6969

7070
If `true`, the marker is able to be dragged to a new position on the map.
7171

72-
#### `latitude`: number {#latitude}
72+
#### `latitude`: number {#latitude}
7373

7474
Required. The latitude of the anchor location.
7575

76-
#### `longitude`: number {#longitude}
76+
#### `longitude`: number {#longitude}
7777

7878
Required. The longitude of the anchor location.
7979

80-
#### `offset`: [PointLike](./types.md#pointlike) {#offset}
80+
#### `offset`: [PointLike](./types.md#pointlike) {#offset}
8181

8282
Default: `null`
8383

8484
The offset in pixels as a [PointLike](https://docs.mapbox.com/mapbox-gl-js/api/geography/#pointlike) object to apply relative to the element's center. Negatives indicate left and up.
8585

86-
#### `pitchAlignment`: 'map' | 'viewport' | 'auto' {#pitchalignment}
86+
#### `pitchAlignment`: 'map' | 'viewport' | 'auto' {#pitchalignment}
8787

8888
Default: `'auto'`
8989

9090
- `map` aligns the `Marker` to the plane of the map.
9191
- `viewport` aligns the `Marker` to the plane of the viewport.
9292
- `auto` automatically matches the value of `rotationAlignment`.
9393

94-
#### `popup`: Popup | null {#popup}
94+
#### `popup`: Popup | null {#popup}
9595

9696
An instance of the `Popup` class ([Mapbox](https://docs.mapbox.com/mapbox-gl-js/api/markers/#popup) | [Maplibre](https://maplibre.org/maplibre-gl-js/docs/API/classes/Popup/)) to attach to this marker. If undefined or null, any popup set on this Marker instance is unset.
9797

98-
#### `rotation`: number {#rotation}
98+
#### `rotation`: number {#rotation}
9999

100100
Default: `0`
101101

102102
The rotation angle of the marker in degrees, relative to its `rotationAlignment` setting. A positive value will rotate the marker clockwise.
103103

104-
#### `rotationAlignment`: 'map' | 'viewport' | 'auto' {#rotationalignment}
104+
#### `rotationAlignment`: 'map' | 'viewport' | 'auto' {#rotationalignment}
105105

106106
Default: `'auto'`
107107

108108
- `map` aligns the `Marker`'s rotation relative to the map, maintaining a bearing as the map rotates.
109109
- `viewport` aligns the `Marker`'s rotation relative to the viewport, agnostic to map rotations.
110110
- `auto` is equivalent to `viewport`.
111111

112-
#### `style`: CSSProperties {#style}
112+
#### `style`: CSSProperties {#style}
113113

114114
CSS style override that applies to the marker's container.
115115

116116
### Callbacks
117117

118-
#### `onClick`: (evt: [MapEvent](./types.md#mapevent)) => void {#onclick}
118+
#### `onClick`: (evt: [MapEvent](./types.md#mapevent)) => void {#onclick}
119119

120120
Called when the marker is clicked on.
121121

122-
#### `onDragStart`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondragstart}
122+
#### `onDragStart`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondragstart}
123123

124124
Called when dragging starts, if `draggable` is `true`.
125125

126-
#### `onDrag`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondrag}
126+
#### `onDrag`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondrag}
127127

128128
Called while dragging, if `draggable` is `true`.
129129

130-
#### `onDragEnd`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondragend}
130+
#### `onDragEnd`: (evt: [MarkerDragEvent](./types.md#markerdragevent)) => void {#ondragend}
131131

132132
Called when dragging ends, if `draggable` is `true`.
133133

@@ -192,7 +192,7 @@ function App() {
192192
const markerRef = useRef<maplibregl.Marker>();
193193

194194
const popup = useMemo(() => {
195-
return maplibregl.Popup().setText('Hello world!');
195+
return new maplibregl.Popup().setText('Hello world!');
196196
}, [])
197197

198198
const togglePopup = useCallback(() => {

0 commit comments

Comments
 (0)