1 | declare namespace google.maps {
|
2 | type MarkerChangeOptionEventNames =
|
3 | | 'animation_changed'
|
4 | | 'clickable_changed'
|
5 | | 'cursor_changed'
|
6 | | 'draggable_changed'
|
7 | | 'flat_changed'
|
8 | | 'icon_changed'
|
9 | | 'position_changed'
|
10 | | 'shape_changed'
|
11 | | 'title_changed'
|
12 | | 'visible_changed'
|
13 | | 'zindex_changed';
|
14 |
|
15 | type MarkerMouseEventNames =
|
16 | | 'click'
|
17 | | 'dblclick'
|
18 | | 'drag'
|
19 | | 'dragend'
|
20 | | 'dragstart'
|
21 | | 'mousedown'
|
22 | | 'mouseout'
|
23 | | 'mouseover'
|
24 | | 'mouseup'
|
25 | | 'rightclick';
|
26 |
|
27 | /**
|
28 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker Maps JavaScript API}
|
29 | */
|
30 | class Marker extends MVCObject {
|
31 | /**
|
32 | * The maximum default `z-index` that the API will assign to a marker. You
|
33 | * may set a higher `z-index` to bring a marker to the front.
|
34 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.MAX_ZINDEX Maps JavaScript API}
|
35 | */
|
36 | static readonly MAX_ZINDEX: number;
|
37 |
|
38 | /**
|
39 | * Creates a marker with the options specified. If a map is specified, the
|
40 | * marker is added to the map upon construction. Note that the position must
|
41 | * be set for the marker to display.
|
42 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.constructor Maps JavaScript API}
|
43 | */
|
44 | constructor(opts?: ReadonlyMarkerOptions);
|
45 |
|
46 | /** @see {//developers.google.com/maps/documentation/javascript/reference/marker#Marker.getAnimation Maps JavaScript API} */
https: |
47 | getAnimation(): Animation | null | undefined;
|
48 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getClickable Maps JavaScript API} */
|
49 | getClickable(): boolean;
|
50 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getCursor Maps JavaScript API} */
|
51 | getCursor(): string | null | undefined;
|
52 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getDraggable Maps JavaScript API} */
|
53 | getDraggable(): boolean | null | undefined;
|
54 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getIcon Maps JavaScript API} */
|
55 | getIcon(): string | ReadonlyIcon | ReadonlySymbol | null | undefined;
|
56 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getLabel Maps JavaScript API} */
|
57 | getLabel(): ReadonlyMarkerLabel | null | undefined;
|
58 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getMap Maps JavaScript API} */
|
59 | getMap(): Map | StreetViewPanorama | null | undefined;
|
60 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getOpacity Maps JavaScript API} */
|
61 | getOpacity(): number | null | undefined;
|
62 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getPosition Maps JavaScript API} */
|
63 | getPosition(): LatLng | null | undefined;
|
64 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getShape Maps JavaScript API} */
|
65 | getShape(): MarkerShape | null | undefined;
|
66 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getTitle Maps JavaScript API} */
|
67 | getTitle(): string | null | undefined;
|
68 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getVisible Maps JavaScript API} */
|
69 | getVisible(): boolean;
|
70 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.getZIndex Maps JavaScript API} */
|
71 | getZIndex(): number | null | undefined;
|
72 | /**
|
73 | * Start an animation. Any ongoing animation will be cancelled. Currently
|
74 | * supported animations are: {@link Animation.BOUNCE BOUNCE},
|
75 | * {@link Animation.DROP DROP}. Passing in `null` will cause any animation
|
76 | * to stop.
|
77 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setAnimation Maps JavaScript API}
|
78 | */
|
79 | setAnimation(animation: Animation | null): void;
|
80 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setClickable Maps JavaScript API} */
|
81 | setClickable(flag: boolean): void;
|
82 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setCursor Maps JavaScript API} */
|
83 | setCursor(cursor: string | null): void;
|
84 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setDraggable Maps JavaScript API} */
|
85 | setDraggable(flag: boolean | null): void;
|
86 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setIcon Maps JavaScript API} */
|
87 | setIcon(icon: string | ReadonlyIcon | ReadonlySymbol | null): void;
|
88 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setLabel Maps JavaScript API} */
|
89 | setLabel(label: string | ReadonlyMarkerLabel | null): void;
|
90 | /**
|
91 | * Renders the marker on the specified map or panorama. If map is set to
|
92 | * `null`, the marker will be removed.
|
93 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setMap Maps JavaScript API}
|
94 | */
|
95 | setMap(map: Map | StreetViewPanorama | null): void;
|
96 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setOpacity Maps JavaScript API} */
|
97 | setOpacity(opacity: number | null): void;
|
98 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setOptions Maps JavaScript API} */
|
99 | setOptions(options: ReadonlyMarkerOptions): void;
|
100 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setPosition Maps JavaScript API} */
|
101 | setPosition(latlng: LatLng | ReadonlyLatLngLiteral | null): void;
|
102 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setShape Maps JavaScript API} */
|
103 | setShape(shape: MarkerShape | null): void;
|
104 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setTitle Maps JavaScript API} */
|
105 | setTitle(title: string | null): void;
|
106 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setVisible Maps JavaScript API} */
|
107 | setVisible(visible: boolean): void;
|
108 | /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Marker.setZIndex Maps JavaScript API} */
|
109 | setZIndex(zIndex: number | null): void;
|
110 | addListener(eventName: MarkerChangeOptionEventNames, handler: (this: Marker) => void): MapsEventListener;
|
111 | addListener(
|
112 | eventName: MarkerMouseEventNames,
|
113 | handler: (this: Marker, event: MouseEvent) => void,
|
114 | ): MapsEventListener;
|
115 | /** @deprecated */
|
116 | addListener(eventName: string, handler: (this: Marker, ...args: any[]) => void): MapsEventListener;
|
117 | }
|
118 |
|
119 | /**
|
120 | * `MarkerOptions` object used to define the properties that can be set on a
|
121 | * {@link Marker}.
|
122 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions Maps JavaScript API}
|
123 | */
|
124 | interface MarkerOptions {
|
125 | /**
|
126 | * The offset from the marker's position to the tip of an InfoWindow that
|
127 | * has been opened with the marker as anchor.
|
128 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.anchorPoint Maps JavaScript API}
|
129 | */
|
130 | anchorPoint?: Point;
|
131 | /**
|
132 | * Which animation to play when marker is added to a map.
|
133 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.animation Maps JavaScript API}
|
134 | */
|
135 | animation?: Animation;
|
136 | /**
|
137 | * If `true`, the marker receives mouse and touch events.
|
138 | * @default true
|
139 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.clickable Maps JavaScript API}
|
140 | */
|
141 | clickable?: boolean;
|
142 | /**
|
143 | * If `false`, disables cross that appears beneath the marker when dragging.
|
144 | * @default true
|
145 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.crossOnDrag Maps JavaScript API}
|
146 | */
|
147 | crossOnDrag?: boolean;
|
148 | /**
|
149 | * Mouse cursor to show on hover.
|
150 | * @default 'pointer'
|
151 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.cursor Maps JavaScript API}
|
152 | * @see {@link CSSStyleDeclaration#cursor}
|
153 | */
|
154 | cursor?: string;
|
155 | /**
|
156 | * If `true`, the marker can be dragged.
|
157 | * @default false
|
158 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.draggable Maps JavaScript API}
|
159 | */
|
160 | draggable?: boolean;
|
161 | /**
|
162 | * Icon for the foreground. If a `string` is provided, it is treated as
|
163 | * though it were an {@link Icon} with the `string` as {@link Icon#url url}.
|
164 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.icon Maps JavaScript API}
|
165 | */
|
166 | // tslint:disable-next-line:no-unnecessary-qualifier
|
167 | icon?: string | Icon | google.maps.Symbol;
|
168 | /**
|
169 | * Adds a label to the marker. The label can either be a `string`, or a
|
170 | * {@link MarkerLabel} object.
|
171 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.label Maps JavaScript API}
|
172 | */
|
173 | label?: string | MarkerLabel;
|
174 | /**
|
175 | * Map on which to display Marker.
|
176 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.map Maps JavaScript API}
|
177 | */
|
178 | map?: Map | StreetViewPanorama;
|
179 | /**
|
180 | * The marker's opacity between 0.0 and 1.0.
|
181 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.opacity Maps JavaScript API}
|
182 | * @default 1.0
|
183 | */
|
184 | opacity?: number;
|
185 | /**
|
186 | * Optimization renders many markers as a single static element. Optimized
|
187 | * rendering is enabled by default. Disable optimized rendering for animated
|
188 | * GIFs or PNGs, or when each marker must be rendered as a separate DOM
|
189 | * element (advanced usage only).
|
190 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.optimized Maps JavaScript API}
|
191 | */
|
192 | optimized?: boolean;
|
193 | /**
|
194 | * Marker position.
|
195 | * **Note that the `position` must be set for the marker to display.**
|
196 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.position Maps JavaScript API}
|
197 | */
|
198 | position?: LatLng | LatLngLiteral;
|
199 | /**
|
200 | * Image map region definition used for drag/click.
|
201 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.shape Maps JavaScript API}
|
202 | */
|
203 | shape?: MarkerShape;
|
204 | /**
|
205 | * Rollover text.
|
206 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.title Maps JavaScript API}
|
207 | * @see {@link HTMLElement#title}
|
208 | */
|
209 | title?: string;
|
210 | /**
|
211 | * If `true`, the marker is visible.
|
212 | * @default true
|
213 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.visible Maps JavaScript API}
|
214 | */
|
215 | visible?: boolean;
|
216 | /**
|
217 | * All markers are displayed on the map in order of their `zIndex`, with
|
218 | * higher values displaying in front of markers with lower values. By
|
219 | * default, markers are displayed according to their vertical position on
|
220 | * screen, with lower markers appearing in front of markers further up the
|
221 | * screen.
|
222 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerOptions.zIndex Maps JavaScript API}
|
223 | */
|
224 | zIndex?: number;
|
225 | }
|
226 |
|
227 | /** @see {@link MarkerOptions} */
|
228 | interface ReadonlyMarkerOptions {
|
229 | /** @see {@link MarkerOptions#anchorPoint} */
|
230 | readonly anchorPoint?: Point;
|
231 | /** @see {@link MarkerOptions#animation} */
|
232 | readonly animation?: Animation;
|
233 | /** @see {@link MarkerOptions#clickable} */
|
234 | readonly clickable?: boolean;
|
235 | /** @see {@link MarkerOptions#crossOnDrag} */
|
236 | readonly crossOnDrag?: boolean;
|
237 | /** @see {@link MarkerOptions#cursor} */
|
238 | readonly cursor?: string;
|
239 | /** @see {@link MarkerOptions#draggable} */
|
240 | readonly draggable?: boolean;
|
241 | /** @see {@link MarkerOptions#icon} */
|
242 | readonly icon?: string | ReadonlyIcon | ReadonlySymbol;
|
243 | /** @see {@link MarkerOptions#label} */
|
244 | readonly label?: string | ReadonlyMarkerLabel;
|
245 | /** @see {@link MarkerOptions#map} */
|
246 | readonly map?: Map | StreetViewPanorama;
|
247 | /** @see {@link MarkerOptions#opacity} */
|
248 | readonly opacity?: number;
|
249 | /** @see {@link MarkerOptions#optimized} */
|
250 | readonly optimized?: boolean;
|
251 | /** @see {@link MarkerOptions#place} */
|
252 | readonly place?: Place;
|
253 | /** @see {@link MarkerOptions#position} */
|
254 | readonly position?: LatLng | ReadonlyLatLngLiteral;
|
255 | /** @see {@link MarkerOptions#shape} */
|
256 | readonly shape?: MarkerShape;
|
257 | /** @see {@link MarkerOptions#title} */
|
258 | readonly title?: string;
|
259 | /** @see {@link MarkerOptions#visible} */
|
260 | readonly visible?: boolean;
|
261 | /** @see {@link MarkerOptions#zIndex} */
|
262 | readonly zIndex?: number;
|
263 | }
|
264 |
|
265 | /**
|
266 | * A structure representing a Marker icon image.
|
267 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon Maps JavaScript API}
|
268 | */
|
269 | interface Icon {
|
270 | /**
|
271 | * The position at which to anchor an image in correspondence to the
|
272 | * location of the marker on the map. By default, the anchor is located
|
273 | * along the center point of the bottom of the image.
|
274 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.anchor Maps JavaScript API}
|
275 | */
|
276 | anchor?: Point;
|
277 | /**
|
278 | * The origin of the label relative to the top-left corner of the icon
|
279 | * image, if a label is supplied by the marker. By default, the origin is
|
280 | * located in the center point of the image.
|
281 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.labelOrigin Maps JavaScript API}
|
282 | */
|
283 | labelOrigin?: Point;
|
284 | /**
|
285 | * The position of the image within a sprite, if any.
|
286 | * @default new google.maps.Point(0, 0)
|
287 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.origin Maps JavaScript API}
|
288 | */
|
289 | origin?: Point;
|
290 | /**
|
291 | * The size of the entire image after scaling, if any. Use this property to
|
292 | * stretch/shrink an image or a sprite.
|
293 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.scaledSize Maps JavaScript API}
|
294 | */
|
295 | scaledSize?: Size;
|
296 | /**
|
297 | * The display size of the sprite or image. When using sprites, you must
|
298 | * specify the sprite size. If the size is not provided, it will be set when
|
299 | * the image loads.
|
300 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.size Maps JavaScript API}
|
301 | */
|
302 | size?: Size;
|
303 | /**
|
304 | * The URL of the image or sprite sheet.
|
305 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Icon.url Maps JavaScript API}
|
306 | */
|
307 | url: string;
|
308 | }
|
309 |
|
310 | /** @see {@link Icon} */
|
311 | interface ReadonlyIcon {
|
312 | /** @see {@link Icon#anchor} */
|
313 | readonly anchor?: Point;
|
314 | /** @see {@link Icon#labelOrigin} */
|
315 | readonly labelOrigin?: Point;
|
316 | /** @see {@link Icon#origin} */
|
317 | readonly origin?: Point;
|
318 | /** @see {@link Icon#scaledSize} */
|
319 | readonly scaledSize?: Size;
|
320 | /** @see {@link Icon#size} */
|
321 | readonly size?: Size;
|
322 | /** @see {@link Icon#url} */
|
323 | readonly url: string;
|
324 | }
|
325 |
|
326 | /**
|
327 | * These options specify the appearance of a marker label. A marker label is a
|
328 | * single character of text which will appear inside the marker. If you are
|
329 | * using it with a custom marker, you can reposition it with the
|
330 | * {@link Icon#labelOrigin labelOrigin} property in the {@link Icon} class.
|
331 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel Maps JavaScript API}
|
332 | */
|
333 | interface MarkerLabel {
|
334 | /**
|
335 | * The color of the label text.
|
336 | * @default 'black'
|
337 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel.color Maps JavaScript API}
|
338 | * @see {@link CSSStyleDeclaration#color}
|
339 | */
|
340 | color?: string;
|
341 | /**
|
342 | * The font family of the label text.
|
343 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel.fontFamily Maps JavaScript API}
|
344 | * @see {@link CSSStyleDeclaration#fontFamily}
|
345 | */
|
346 | fontFamily?: string;
|
347 | /**
|
348 | * The font size of the label text.
|
349 | * @default '14px'
|
350 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel.fontSize Maps JavaScript API}
|
351 | * @see {@link CSSStyleDeclaration#fontSize}
|
352 | */
|
353 | fontSize?: string;
|
354 | /**
|
355 | * The font weight of the label text.
|
356 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel.fontWeight Maps JavaScript API}
|
357 | * @see {@link CSSStyleDeclaration#fontWeight}
|
358 | */
|
359 | fontWeight?: string;
|
360 | /**
|
361 | * The text to be displayed in the label.
|
362 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerLabel.text Maps JavaScript API}
|
363 | */
|
364 | text: string;
|
365 | }
|
366 |
|
367 | /** @see {@link MarkerLabel} */
|
368 | interface ReadonlyMarkerLabel {
|
369 | /** @see {@link MarkerLabel#color} */
|
370 | color?: string;
|
371 | /** @see {@link MarkerLabel#fontFamily} */
|
372 | fontFamily?: string;
|
373 | /** @see {@link MarkerLabel#fontSize} */
|
374 | fontSize?: string;
|
375 | /** @see {@link MarkerLabel#fontWeight} */
|
376 | fontWeight?: string;
|
377 | /** @see {@link MarkerLabel#text} */
|
378 | text: string;
|
379 | }
|
380 |
|
381 | interface MarkerShapeCircle {
|
382 | type: 'circle';
|
383 | /**
|
384 | * Coords is **[x1,y1,r]** where x1,y2 are the coordinates of the center of
|
385 | * the circle, and r is the radius of the circle.
|
386 | */
|
387 | coords: [number, number, number];
|
388 | }
|
389 |
|
390 | interface MarkerShapeRect {
|
391 | type: 'rect';
|
392 | /**
|
393 | * Coords is **[x1,y1,x2,y2]** where x1,y1 are the coordinates of the
|
394 | * upper-left corner of the rectangle and x2,y2 are the coordinates of the
|
395 | * lower-right coordinates of the rectangle.
|
396 | */
|
397 | coords: [number, number, number, number];
|
398 | }
|
399 |
|
400 | interface MarkerShapePolyCoords extends Array<number> {
|
401 | 0: number;
|
402 | 1: number;
|
403 | 2: number;
|
404 | 3: number;
|
405 | }
|
406 |
|
407 | interface MarkerShapePoly {
|
408 | type: 'poly';
|
409 | /**
|
410 | * Coords is **[x1,y1,x2,y2...xn,yn]** where each x,y pair contains the
|
411 | * coordinates of one vertex of the polygon.
|
412 | */
|
413 | coords: MarkerShapePolyCoords;
|
414 | }
|
415 |
|
416 | /**
|
417 | * This object defines the clickable region of a marker image. The shape
|
418 | * consists of two properties — `type` and `coord` — which define the
|
419 | * non-transparent region of an image.
|
420 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#MarkerShape Maps JavaScript API}
|
421 | */
|
422 | type MarkerShape = MarkerShapeCircle | MarkerShapeRect | MarkerShapePoly;
|
423 |
|
424 | /**
|
425 | * Describes a symbol, which consists of a vector path with styling. A symbol
|
426 | * can be used as the icon of a marker, or placed on a polyline.
|
427 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol Maps JavaScript API}
|
428 | */
|
429 | interface Symbol {
|
430 | /**
|
431 | * The position of the symbol relative to the marker or polyline. The
|
432 | * coordinates of the symbol's path are translated left and up by the
|
433 | * anchor's x and y coordinates respectively. The position is expressed in
|
434 | * the same coordinate system as the symbol's path.
|
435 | * @default new google.maps.Point(0, 0)
|
436 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.anchor Maps JavaScript API}
|
437 | */
|
438 | anchor?: Point;
|
439 | /**
|
440 | * The symbol's fill color. All CSS3 colors are supported except for
|
441 | * extended named colors. For symbol markers, this defaults to 'black'.
|
442 | * For symbols on polylines, this defaults to the stroke color of the
|
443 | * corresponding polyline.
|
444 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.fillColor Maps JavaScript API}
|
445 | */
|
446 | fillColor?: string;
|
447 | /**
|
448 | * The symbol's fill opacity.
|
449 | * @default 1
|
450 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.fillOpacity Maps JavaScript API}
|
451 | */
|
452 | fillOpacity?: number;
|
453 | /**
|
454 | * The origin of the label relative to the origin of the path, if label is
|
455 | * supplied by the marker. The origin is expressed in the same coordinate
|
456 | * system as the symbol's path. This property is unused for symbols on
|
457 | * polylines.
|
458 | * @default new google.maps.Point(0, 0)
|
459 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.labelOrigin Maps JavaScript API}
|
460 | */
|
461 | labelOrigin?: Point;
|
462 | /**
|
463 | * The symbol's path, which is a built-in symbol path, or a custom path
|
464 | * expressed using
|
465 | * {@link http://www.w3.org/TR/SVG/paths.html#PathData SVG path notation}.
|
466 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.path Maps JavaScript API}
|
467 | */
|
468 | path: SymbolPath | string;
|
469 | /**
|
470 | * The angle by which to rotate the symbol, expressed clockwise in degrees.
|
471 | * A symbol in an {@link IconSequence} where
|
472 | * {@link IconSequence#fixedRotation fixedRotation} is false is rotated
|
473 | * relative to the angle of the edge on which it lies.
|
474 | * @default 0
|
475 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.rotation Maps JavaScript API}
|
476 | */
|
477 | rotation?: number;
|
478 | /**
|
479 | * The amount by which the symbol is scaled in size. For symbol markers,
|
480 | * this defaults to 1; after scaling, the symbol may be of any size. For
|
481 | * symbols on a polyline, this defaults to the stroke weight of the
|
482 | * polyline; after scaling, the symbol must lie inside a square 22 pixels in
|
483 | * size centered at the symbol's anchor.
|
484 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.scale Maps JavaScript API}
|
485 | */
|
486 | scale?: number;
|
487 | /**
|
488 | * The symbol's stroke color. All CSS3 colors are supported except for
|
489 | * extended named colors. For symbol markers, this defaults to 'black'. For
|
490 | * symbols on a polyline, this defaults to the stroke color of the polyline.
|
491 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.strokeColor Maps JavaScript API}
|
492 | */
|
493 | strokeColor?: string;
|
494 | /**
|
495 | * The symbol's stroke opacity. For symbol markers, this defaults to 1. For
|
496 | * symbols on a polyline, this defaults to the stroke opacity of the
|
497 | * polyline.
|
498 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.strokeOpacity Maps JavaScript API}
|
499 | */
|
500 | strokeOpacity?: number;
|
501 | /**
|
502 | * The symbol's stroke weight. Defaults to the scale of the symbol.
|
503 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Symbol.strokeWeight Maps JavaScript API}
|
504 | */
|
505 | strokeWeight?: number;
|
506 | }
|
507 |
|
508 | /** @see {@link Symbol} */
|
509 | interface ReadonlySymbol {
|
510 | /** @see {@link Symbol#anchor} */
|
511 | readonly anchor?: Point;
|
512 | /** @see {@link Symbol#fillColor} */
|
513 | readonly fillColor?: string;
|
514 | /** @see {@link Symbol#fillOpacity} */
|
515 | readonly fillOpacity?: number;
|
516 | /** @see {@link Symbol#labelOrigin} */
|
517 | readonly labelOrigin?: Point;
|
518 | /** @see {@link Symbol#path} */
|
519 | readonly path: SymbolPath | string;
|
520 | /** @see {@link Symbol#rotation} */
|
521 | readonly rotation?: number;
|
522 | /** @see {@link Symbol#scale} */
|
523 | readonly scale?: number;
|
524 | /** @see {@link Symbol#strokeColor} */
|
525 | readonly strokeColor?: string;
|
526 | /** @see {@link Symbol#strokeOpacity} */
|
527 | readonly strokeOpacity?: number;
|
528 | /** @see {@link Symbol#strokeWeight} */
|
529 | readonly strokeWeight?: number;
|
530 | }
|
531 |
|
532 | /**
|
533 | * Built-in symbol paths.
|
534 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath Maps JavaScript API}
|
535 | */
|
536 | enum SymbolPath {
|
537 | /**
|
538 | * A backward-pointing closed arrow.
|
539 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath.BACKWARD_CLOSED_ARROW Maps JavaScript API}
|
540 | */
|
541 | BACKWARD_CLOSED_ARROW = 3,
|
542 | /**
|
543 | * A backward-pointing open arrow.
|
544 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath.BACKWARD_OPEN_ARROW Maps JavaScript API}
|
545 | */
|
546 | BACKWARD_OPEN_ARROW = 4,
|
547 | /**
|
548 | * A circle.
|
549 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath.CIRCLE Maps JavaScript API}
|
550 | */
|
551 | CIRCLE = 0,
|
552 | /**
|
553 | * A forward-pointing closed arrow.
|
554 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath.FORWARD_CLOSED_ARROW Maps JavaScript API}
|
555 | */
|
556 | FORWARD_CLOSED_ARROW = 1,
|
557 | /**
|
558 | * A forward-pointing open arrow.
|
559 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath.FORWARD_OPEN_ARROW Maps JavaScript API}
|
560 | */
|
561 | FORWARD_OPEN_ARROW = 2,
|
562 | }
|
563 |
|
564 | /**
|
565 | * Animations that can be played on a marker. Use the
|
566 | * {@link Marker#setAnimation setAnimation} method on Marker or the
|
567 | * {@link MarkerOptions#animation animation} option to play an animation.
|
568 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Animation Maps JavaScript API}
|
569 | */
|
570 | enum Animation {
|
571 | /**
|
572 | * Marker bounces until animation is stopped.
|
573 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Animation.BOUNCE Maps JavaScript API}
|
574 | */
|
575 | BOUNCE = 1,
|
576 | /**
|
577 | * Marker falls from the top of the map ending with a small bounce.
|
578 | * @see {@link https://developers.google.com/maps/documentation/javascript/reference/marker#Animation.DROP Maps JavaScript API}
|
579 | */
|
580 | DROP = 2,
|
581 | }
|
582 | }
|