Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added docs for PointAnnotation and Callout
- Loading branch information
Nick
committed
Oct 23, 2017
1 parent
70f4a1c
commit 0440584
Showing
4 changed files
with
189 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## <MapboxGL.Callout /> | ||
### Callout that displays information about a selected annotation near the annotation. | ||
|
||
### props | ||
| Prop | Type | Default | Required | Description | | ||
| ---- | :--: | :-----: | :------: | :----------: | | ||
| title | `string` | `none` | `false` | String that get's displayed in the default callout. | | ||
| style | `any` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this | | ||
| containerStyle | `any` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. | | ||
| contentStyle | `any` | `none` | `false` | Style property for the content bubble. | | ||
| tipStyle | `any` | `none` | `false` | Style property for the triangle tip under the content. | | ||
| textStyle | `any` | `none` | `false` | Style property for the title in the content bubble. | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## <MapboxGL.PointAnnotation /> | ||
### PointAnnotation represents a one-dimensional shape located at a single geographical coordinate. | ||
|
||
### props | ||
| Prop | Type | Default | Required | Description | | ||
| ---- | :--: | :-----: | :------: | :----------: | | ||
| id | `string` | `none` | `true` | A string that uniquely identifies the annotation | | ||
| 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. | | ||
| snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. | | ||
| selected | `bool` | `none` | `false` | Manually selects/deselects annotation<br/>@type {[type]} | | ||
| coordinate | `arrayOf` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. | | ||
| 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. | | ||
| onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param. | | ||
| onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected. | | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters