Skip to content

Commit 53f5fe9

Browse files
authored
refactor(ts): refactor point annotation as a tsx component (#2223)
1 parent a7f01eb commit 53f5fe9

39 files changed

+449
-343
lines changed

docs/Annotation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | FIX ME NO DESCRIPTION |
99
| animated | `bool` | `false` | `false` | FIX ME NO DESCRIPTION |
1010
| animationDuration | `number` | `1000` | `false` | FIX ME NO DESCRIPTION |

docs/Atmosphere.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| style | `AtmosphereLayerStyleProps` | `none` | `true` | FIX ME NO DESCRIPTION |
99

1010

docs/BackgroundLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/Callout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Callout that displays information about a selected annotation near the annotatio
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| title | `string` | `none` | `false` | String that gets displayed in the default callout. |
99
| style | `any` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this |
1010
| containerStyle | `any` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. |

docs/Camera.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ return (
2020

2121
## props
2222
| Prop | Type | Default | Required | Description |
23-
| ---- | :--: | :-----: | :------: | :----------: |
23+
| ---- | :-- | :----- | :------ | :---------- |
2424
| type | `literal` | `none` | `false` | Allows static check of the data type. For internal use only. |
2525
| centerCoordinate | `Position` | `none` | `false` | The location on which the map should center. |
2626
| bounds | `intersection` | `none` | `false` | The corners of a box around which the map should bound. Contains padding props for backwards<br/>compatibility; the root `padding` prop should be used instead. |

docs/CircleLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ CircleLayer is a style layer that renders one or more filled circles on the map.
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property<br/>from which the receiver obtains the data to style. |

docs/FillExtrusionLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FillExtrusionLayer is a style layer that renders one or more 3D extruded polygon
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/FillLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FillLayer is a style layer that renders one or more filled (and optionally strok
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/HeadingIndicator.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| heading | `number` | `none` | `false` | FIX ME NO DESCRIPTION |
99

1010

docs/HeatmapLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ HeatmapLayer is a style layer that renders one or more filled circles on the map
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property<br/>from which the receiver obtains the data to style. |

docs/ImageSource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The georeferenced image scales and rotates as the user zooms and rotates the map
55

66
## props
77
| Prop | Type | Default | Required | Description |
8-
| ---- | :--: | :-----: | :------: | :----------: |
8+
| ---- | :-- | :----- | :------ | :---------- |
99
| id | `string` | `none` | `true` | A string that uniquely identifies the source. |
1010
| url | `union` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL to the source image.<br/>Gifs are currently not supported. |
1111
| coordinates | `array` | `none` | `true` | The top left, top right, bottom right, and bottom left coordinates for the image. |

docs/Images.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Images defines the images used in Symbol etc. layers.
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| images | `object` | `none` | `false` | Specifies the external images in key-value pairs required for the shape source.<br/>Keys are names - see iconImage expressions, values can be either urls-s objects<br/>with format {uri: 'http://...'}` or `require('image.png')` or `import 'image.png'` |
99
| nativeAssetImages | `array` | `none` | `false` | If you have an asset under Image.xcassets on iOS and the drawables directory on android<br/>you can specify an array of string names with assets as the key `['pin']`. |
1010
| onImageMissing | `func` | `none` | `false` | Gets called when a Layer is trying to render an image whose key is not present in<br/>any of the `Images` component of the Map. |

docs/Light.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Light represents the light source for extruded geometries
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| style | `custom` | `none` | `false` | Customizable style attributes |
99

1010

docs/LineLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LineLayer is a style layer that renders one or more stroked polylines on the map
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/MapView.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ MapView backed by Mapbox Native GL
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. |
99
| style | `any` | `none` | `false` | Style for wrapping React Native View |
1010
| styleURL | `string` | `none` | `false` | Style URL for map - notice, if non is set it _will_ default to `MapboxGL.StyleURL.Street` |

docs/MarkerView.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and PointAnnotation on iOS.
99

1010
## props
1111
| Prop | Type | Default | Required | Description |
12-
| ---- | :--: | :-----: | :------: | :----------: |
12+
| ---- | :-- | :----- | :------ | :---------- |
1313
| coordinate | `tuple` | `none` | `true` | The center point (specified as a map coordinate) of the marker.<br/>See also #anchor. |
1414
| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
1515
| &nbsp;&nbsp;x | `number` | `none` | `true` | `x` of anchor |

docs/NativeUserLocation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| androidRenderMode | `enum` | `none` | `false` | Android render mode.<br/><br/> - normal: just a circle<br/> - compass: triangle with heading<br/> - gps: large arrow<br/><br/>@platform android |
99
| iosShowsUserHeadingIndicator | `bool` | `none` | `false` | iOS only. A Boolean value indicating whether the user location annotation may display a permanent heading indicator.<br/><br/>@platform ios |
1010

docs/PointAnnotation.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- This file was autogenerated from PointAnnotation.js do not modify -->
1+
<!-- This file was autogenerated from PointAnnotation.tsx do not modify -->
22
# <MapboxGL.PointAnnotation />
33
PointAnnotation represents a one-dimensional shape located at a single geographical coordinate.
44

@@ -10,21 +10,23 @@ as with PointAnnotation on Android child views are rendered onto a bitmap for be
1010

1111
## props
1212
| Prop | Type | Default | Required | Description |
13-
| ---- | :--: | :-----: | :------: | :----------: |
13+
| ---- | :-- | :----- | :------ | :---------- |
1414
| id | `string` | `none` | `true` | A string that uniquely identifies the annotation |
1515
| title | `string` | `none` | `false` | The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS. |
1616
| snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. |
17-
| selected | `bool` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} |
18-
| draggable | `bool` | `false` | `false` | Enable or disable dragging. Defaults to false. |
19-
| coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
17+
| selected | `boolean` | `none` | `false` | Manually selects/deselects annotation |
18+
| draggable | `boolean` | `false` | `false` | Enable or disable dragging. Defaults to false. |
19+
| coordinate | `tuple` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. |
2020
| anchor | `shape` | `{ x: 0.5, y: 0.5 }` | `false` | Specifies the anchor being set on a particular point of the annotation.<br/>The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],<br/>where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.<br/>Note this is only for custom annotations not the default pin view.<br/>Defaults to the center of the view. |
2121
| &nbsp;&nbsp;x | `number` | `none` | `true` | See anchor |
2222
| &nbsp;&nbsp;y | `number` | `none` | `true` | See anchor |
23-
| onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param. |
24-
| onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected. |
25-
| onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged. |
26-
| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. |
27-
| onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged. |
23+
| onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param.<br/>*signature:*`(payload:{feature: Feature}) => void` |
24+
| onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected.<br/>*signature:*`(payload:{feature: Feature}) => void` |
25+
| onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged.<br/>*signature:*`(payload:{feature: Feature}) => void` |
26+
| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged.<br/>*signature:*`(payload:{feature: Feature}) => void` |
27+
| onDrag | `func` | `none` | `false` | This callback is fired while this annotation is being dragged.<br/>*signature:*`(payload:{feature: Feature}) => void` |
28+
| children | `ReactReactElement` | `none` | `true` | Expects one child, and an optional callout can be added as well |
29+
| style | `ViewProps['style']` | `none` | `false` | FIX ME NO DESCRIPTION |
2830

2931
## methods
3032
### refresh()

docs/RasterDemSource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
99
| url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
1010
| tileUrlTemplates | `array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/raster-tiles/{z}/{x}/{y}.png |

docs/RasterLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/RasterSource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ or by an external file that conforms to the TileJSON specification.
66

77
## props
88
| Prop | Type | Default | Required | Description |
9-
| ---- | :--: | :-----: | :------: | :----------: |
9+
| ---- | :-- | :----- | :------ | :---------- |
1010
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
1111
| url | `string` | `none` | `false` | A URL to a TileJSON configuration file describing the source’s contents and other metadata. |
1212
| tileUrlTemplates | `array` | `none` | `false` | An array of tile URL templates. If multiple endpoints are specified, clients may use any combination of endpoints.<br/>Example: https://example.com/raster-tiles/{z}/{x}/{y}.png |

docs/ShapeSource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The shape may be an url or a GeoJSON object
55

66
## props
77
| Prop | Type | Default | Required | Description |
8-
| ---- | :--: | :-----: | :------: | :----------: |
8+
| ---- | :-- | :----- | :------ | :---------- |
99
| id | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | A string that uniquely identifies the source. |
1010
| url | `string` | `none` | `false` | An HTTP(S) URL, absolute file URL, or local file URL relative to the current application’s resource bundle. |
1111
| shape | `object` | `none` | `false` | The contents of the source. A shape can represent a GeoJSON geometry, a feature, or a feature collection. |

docs/SkyLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SkyLayer is a spherical dome around the map that is always rendered behind all o
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined. |
1010
| aboveLayerID | `string` | `none` | `false` | Inserts a layer above aboveLayerID. |

docs/Style.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Other fields such as `sprites`, `glyphs` etc. will be ignored. Not all layer / s
66

77
## props
88
| Prop | Type | Default | Required | Description |
9-
| ---- | :--: | :-----: | :------: | :----------: |
9+
| ---- | :-- | :----- | :------ | :---------- |
1010
| json | `any` | `none` | `false` | A JSON object conforming to the schema described in the Mapbox Style Specification , or a URL to such JSON. |
1111

1212

docs/SymbolLayer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ SymbolLayer is a style layer that renders icon and text labels at points or alon
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| id | `string` | `none` | `true` | A string that uniquely identifies the source in the style to which it is added. |
99
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | The source from which to obtain the data to style.<br/>If the source has not yet been added to the current style, the behavior is undefined.<br/>Inferred from parent source only if the layer is a direct child to it. |
1010
| sourceLayerID | `string` | `none` | `false` | Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style. |

docs/Terrain.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ A global modifier that elevates layers and markers based on a DEM data source.
44

55
## props
66
| Prop | Type | Default | Required | Description |
7-
| ---- | :--: | :-----: | :------: | :----------: |
7+
| ---- | :-- | :----- | :------ | :---------- |
88
| sourceID | `string` | `MapboxGL.StyleSource.DefaultSourceID` | `false` | Name of a source of raster_dem type to be used for terrain elevation. |
99
| exaggeration | `union` | `none` | `false` | Optional number between 0 and 1000 inclusive. Defaults to 1. Supports interpolateexpressions. Transitionable.<br/>Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value. |
1010

0 commit comments

Comments
 (0)