├── .github └── workflows │ └── build.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── bsconfig.json ├── docs ├── Callout.md ├── CalloutSubview.md ├── Circle.md ├── Geojson.md ├── Heatmap.md ├── LatLng.md ├── MapView.md ├── MapViewAnimated.md ├── Marker.md ├── MarkerAnimated.md ├── Overlay.md ├── Polygon.md ├── Polyline.md ├── Region.md └── Shared.md ├── package.json ├── src ├── Callout.bs.js ├── Callout.re ├── CalloutSubview.bs.js ├── CalloutSubview.re ├── Circle.bs.js ├── Circle.re ├── Geojson.bs.js ├── Geojson.re ├── Heatmap.bs.js ├── Heatmap.re ├── LatLng.bs.js ├── LatLng.re ├── LocalTile.bs.js ├── LocalTile.re ├── MapView.bs.js ├── MapView.re ├── Marker.bs.js ├── Marker.re ├── NativeElement.bs.js ├── NativeElement.re ├── Overlay.bs.js ├── Overlay.re ├── Polygon.bs.js ├── Polygon.re ├── Polyline.bs.js ├── Polyline.re ├── Region.bs.js ├── Region.re ├── Shared.bs.js ├── Shared.re ├── UrlTile.bs.js ├── UrlTile.re ├── WMSTile.bs.js └── WMSTile.re └── yarn.lock /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | strategy: 11 | matrix: 12 | node-version: 13 | - 8.x 14 | - 10.x 15 | - 12.x 16 | 17 | steps: 18 | - uses: actions/checkout@v1 19 | - name: Use Node.js ${{ matrix.node-version }} 20 | uses: actions/setup-node@v1 21 | with: 22 | node-version: ${{ matrix.node-version }} 23 | - name: Install 24 | run: | 25 | yarn install \ 26 | --non-interactive \ 27 | --frozen-lockfile 28 | - name: Test 29 | run: yarn test 30 | env: 31 | CI: true 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS Finder artifacts 2 | .DS_Store 3 | 4 | # node 5 | node_modules 6 | 7 | # ocaml/reason build artifacts 8 | .bsb.lock 9 | **/lib/bs 10 | **/lib/ocaml 11 | **/.merlin 12 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog of `reason-react-native-maps` 2 | 3 | ## 0.27.0 - 2020-03-19 4 | 5 | Added `Overlay.Animated` component 6 | 7 | ## 0.26.4 - 2019-11-28 8 | 9 | Added support for GeoJSON. 10 | 11 | ## 0.26.3 - 2019-11-18 12 | 13 | Added support for Animated components with the introduction of 14 | 15 | - `MapView.Animated` and `Marker.Animated` components 16 | - `Region.animated` and `LatLng.animated` types 17 | 18 | ## 0.26.2 - 2019-11-15 19 | 20 | Added `LocalTile`, `UrlTile` and `WMSTile` components for custom tile overlays. 21 | 22 | ## 0.26.1 - 2019-11-15 23 | 24 | Added `ref` prop to `MapView` and `Marker` 25 | 26 | ## 0.26.0 - 2019-11-1 27 | 28 | Note that there are breaking changes in this release: 29 | 30 | - `react-native-maps` is now a peer dependency to make it more straightforward 31 | to use other versions of said package. 32 | - added constructors for some types passed as arguments to `MapView` methods 33 | - scripts are brought in line with those for `@reason-react-native/*` packages. 34 | 35 | Other changes: 36 | 37 | - documentation added for components and types 38 | 39 | ## 0.24.1 - 2019-06-24 40 | 41 | `View` props added to components 42 | 43 | ## 0.24.0 - 2019-06-17 44 | 45 | Initial release. 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 sgny 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BuckleScript bindings to React Native Maps 2 | 3 | [![Build Status](https://github.com/sgny/reason-react-native-maps/workflows/Build/badge.svg)](https://github.com/sgny/reason-react-native-maps/actions) 4 | [![Version](https://img.shields.io/npm/v/reason-react-native-maps.svg)](https://www.npmjs.com/package/reason-react-native-maps) 5 | 6 | These are complete BuckleScript bindings to 7 | [`React Native Maps`](https://github.com/react-native-community/react-native-maps), 8 | in Reason syntax. 9 | 10 | Version `x.y.z` of `reason-react-native-maps` should be compatible with version 11 | `x.y.*` of `react-native-maps`. 12 | 13 | ## Changes 14 | 15 | Please see the [changelog](./CHANGELOG.md). 16 | 17 | ## Installation 18 | 19 | With `yarn`: 20 | 21 | ```shell 22 | yarn add reason-react-native-maps 23 | ``` 24 | 25 | With `npm`: 26 | 27 | ```shell 28 | npm install reason-react-native-maps 29 | ``` 30 | 31 | `react-native-maps` should be properly installed, and linked if you are using 32 | React Native versions below 0.60. Please refer to the relevant 33 | [instructions](https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md). 34 | 35 | Finally, `reason-react-native-maps` should be added to `bs-dependencies` in 36 | `BuckleScript` configuration of the project (`bsconfig.json`). For example, 37 | 38 | ```json 39 | { 40 | ... 41 | "bs-dependencies": ["reason-react", "reason-react-native", "reason-react-native-maps"], 42 | ... 43 | } 44 | ``` 45 | 46 | ## Modules 47 | 48 | ### [MapView](docs/MapView.md) 49 | 50 | ### [MapView.Animated](docs/MapViewAnimated.md) 51 | 52 | ### [Marker](docs/Marker.md) 53 | 54 | ### [Marker.Animated](docs/MarkerAnimated.md) 55 | 56 | ### [Heatmap](docs/Heatmap.md) 57 | 58 | ### [Circle](docs/Circle.md) 59 | 60 | ### [Overlay](docs/Overlay.md) 61 | 62 | ### [Polygon](docs/Polygon.md) 63 | 64 | ### [Polyline](docs/Polyline.md) 65 | 66 | ### [Callout](docs/Callout.md) 67 | 68 | ### [CalloutSubview](docs/CalloutSubview.md) 69 | 70 | ### [Geojson](docs/Geojson.md) 71 | 72 | ## Types 73 | 74 | ### [LatLng](docs/LatLng.md) 75 | 76 | ### [Region](docs/Region.md) 77 | 78 | ### [Shared](docs/Shared.md) 79 | 80 | Further documentation will be added later. Documentation has been adapted from 81 | that for `React Native Maps`. 82 | -------------------------------------------------------------------------------- /bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reason-react-native-maps", 3 | "namespace": "react-native-maps", 4 | "refmt": 3, 5 | "reason": { 6 | "react-jsx": 3 7 | }, 8 | "package-specs": { 9 | "module": "commonjs", 10 | "in-source": true 11 | }, 12 | "suffix": ".bs.js", 13 | "sources": [ 14 | { 15 | "dir": "src", 16 | "subdirs": false 17 | } 18 | ], 19 | "bsc-flags": ["-bs-no-version-header"], 20 | "bs-dependencies": ["reason-react", "reason-react-native"] 21 | } 22 | -------------------------------------------------------------------------------- /docs/Callout.md: -------------------------------------------------------------------------------- 1 | # `Callout` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | -------------- | ------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `tooltip` | `bool` | `false` | If `false`, a default "tooltip" bubble window will be drawn around this callouts children. If `true`, the child views can fully customize their appearance, including any "bubble" like styles. | 8 | | `alphaHitTest` | `bool` | `false` | If `true`, clicks on transparent areas in callout will be passed to map. **Note**: iOS only. | 9 | 10 | ## Events 11 | 12 | Callback that is called when the user presses on the callout. The `onPress` 13 | event returns `ReactNative.Event.syntheticEvent({. action: action})`. 14 | Accordingly, to handle the event you need to pass a function of type 15 | `ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to 16 | use the `##` accessor for each individual key within the function specified. 17 | 18 | ## Types 19 | 20 | ### `action` 21 | 22 | Valid values are 23 | 24 | - `calloutPress` when using `MapKit` on iOS or `GoogleMaps` on Android 25 | - `marker-overlay-press` when using `GoogleMaps` on iOS 26 | -------------------------------------------------------------------------------- /docs/CalloutSubview.md: -------------------------------------------------------------------------------- 1 | # `CalloutSubview` Component API 2 | 3 | **Note**: Supported on iOS only. Use to handle press on specific subview of 4 | callout. This component should be a child of a `Callout` component. 5 | 6 | ## Events 7 | 8 | ### `onPress` 9 | 10 | Callback that is called when the user presses on this subview inside callout. 11 | The `onPress` event returns 12 | `ReactNative.Event.syntheticEvent({. action: action})`. Accordingly, to handle 13 | the event you need to pass a function of type 14 | `ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to 15 | use the `##` accessor for each individual key within the function specified. 16 | 17 | ## Types 18 | 19 | ### `action` 20 | 21 | Valid values are: 22 | 23 | - `calloutInsidePress` when using `MapKit` 24 | - `markerInsideOverlayPress` when using `GoogleMaps` 25 | -------------------------------------------------------------------------------- /docs/Circle.md: -------------------------------------------------------------------------------- 1 | # `Circle` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | ----------------- | -------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `center` | `LatLng.t` | (Required) | The coordinate of the center of the circle | 8 | | `radius` | `float` | (Required) | The radius of the circle to be drawn (in meters) | 9 | | `strokeWidth` | `float` | `1.0` | The stroke width to use for the path. | 10 | | `strokeColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The stroke color to use for the path. | 11 | | `fillColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The fill color to use for the path. | 12 | | `zIndex` | `int` | 0 | The order in which this tile overlay is drawn with respect to other overlays. An overlay with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays with the same z-index is arbitrary. The default zIndex is 0. (Android Only) | 13 | | `lineCap` | \[ \| \`butt \| \`round \| \`square \] | \`round | The line cap style to apply to the open ends of the path. | 14 | | `lineJoin` | \[ \| \`bevel \| \`miter \| \`round \] | | The line join style to apply to corners of the path. | 15 | | `miterLimit` | `int` | `10` | The limiting value that helps avoid spikes at junctions between connected line segments. The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If the ratio of miter length (diagonal length of the miter join) to line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit is `10`, which results in the conversion of miters whose angle at the joint is less than 11 degrees. | 16 | | `geodesic` | `bool` | | to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection. A geodesic is the shortest path between two points on the Earth's surface. The geodesic curve is constructed assuming the Earth is a sphere. | 17 | | `lineDashPhase` | `int` | `0` | (iOS only) The offset (in points) at which to start drawing the dash pattern. Use this property to start drawing a dashed line partway through a segment or gap. For example, a phase value of `6` for the pattern `[| 5, 2, 3, 2|]` would cause drawing to begin in the middle of the first gap. | 18 | | `lineDashPattern` | `array(int)` | | (iOS only) An array of numbers specifying the dash pattern to use for the path. The array contains one or more numbers that indicate the lengths (measured in points) of the line segments and gaps in the pattern. The values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on. | 19 | -------------------------------------------------------------------------------- /docs/Geojson.md: -------------------------------------------------------------------------------- 1 | # `Geojson` Component 2 | 3 | In order to limit dependencies for `reason-react-native-maps`, a ready-to-use 4 | `Geojson` component is not provided. Instead, a suitable instance of the 5 | `Geojson.Make` module needs to be created, as below, specifying the type for the 6 | `geojson` prop: 7 | 8 | #### **`YourModule.re`** 9 | 10 | ```reason 11 | include ReactNativeMaps.Geojson.Make({ 12 | type t = someType; 13 | }); 14 | ``` 15 | 16 | While you may define your own type, for type safe handling of `GeoJSON` objects, 17 | you may use the types defined in the 18 | [GeoReason](https://github.com/HomeBay/geo-reason/) package. In that case, the 19 | relevant type is `GeoReason.Data.t` and the instance can be created as below: 20 | 21 | #### **`YourModule.re`** 22 | 23 | ```reason 24 | include ReactNativeMaps.Geojson.Make({ 25 | type t = GeoReason.Data.t; 26 | }); 27 | ``` 28 | 29 | Please make sure to follow installation instructions for `GeoReason` and update 30 | `bsconfig.json` accordingly for your project. 31 | 32 | Once created, the module would be used as below: 33 | 34 | ```reason 35 | 38 | ``` 39 | 40 | Please note that only the `FeatureCollection(list(Feature.t))` variant will be 41 | valid for use with your component. 42 | 43 | An instance of the module may be created within your module, as a submodule, as 44 | below: 45 | 46 | #### **`YourModule.re`** 47 | 48 | ```reason 49 | module Geojson = ReactNativeMaps.Geojson.Make({ 50 | type t = someType; 51 | }); 52 | ``` 53 | 54 | in which case the module would be used as below: 55 | 56 | ```reason 57 | 60 | ``` 61 | -------------------------------------------------------------------------------- /docs/Heatmap.md: -------------------------------------------------------------------------------- 1 | # `Heatmap` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | ---------- | ------------------------ | ------- | ----------------------------------------------------------------- | 7 | | `points` | `array(LatLng.weighted)` | | Array of heatmap entries to apply towards density. | 8 | | `radius` | `int` | `20` | The radius of the heatmap points in pixels, between 10 and 50. | 9 | | `opacity` | `float` | `0.7` | The opacity of the heatmap. | 10 | | `gradient` | `gradient` | | Heatmap gradient configuration (See below for _Gradient Config_). | 11 | 12 | ## Type 13 | 14 | ### `gradient` 15 | 16 | [Android Doc](https://developers.google.com/maps/documentation/android-sdk/utility/heatmap#custom) 17 | | 18 | [iOS Doc](https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap#customize) 19 | 20 | | Prop | Type | Default | Note | 21 | | -------------- | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- | 22 | | `colors` | `array(ReactNative.Color.t)` | | Colors (one or more) to use for gradient. | 23 | | `startPoints` | `array(float)` | | Array of floating point values from 0 to 1 representing where each color starts. Array length must be equal to `colors` array length. | 24 | | `colorMapSize` | `int` | `256` | Resolution of color map -- number corresponding to the number of steps colors are interpolated into. | 25 | 26 | ```reason 27 | gradient: (~colors: array(ReactNative.Color.t), ~startPoints: array(float), ~colorMapSize: int=?, unit) => gradient 28 | ``` 29 | -------------------------------------------------------------------------------- /docs/LatLng.md: -------------------------------------------------------------------------------- 1 | # `LatLng` 2 | 3 | ## Types 4 | 5 | ### `t` 6 | 7 | This type needs to be created, as well as consumed. When the type is returned, 8 | individual keys may be accessed using the `##` accessor. 9 | 10 | ```reason 11 | type t = { 12 | . 13 | "latitude": float, 14 | "longitude": float, 15 | }; 16 | ``` 17 | 18 | ```reason 19 | create: (~latitude: float, ~longitude: float) => t 20 | ``` 21 | 22 | ### `weighted` 23 | 24 | ```reason 25 | weighted: (~latitude: float, ~longitude: float, ~weight: float=?, unit) => t 26 | ``` 27 | 28 | ### `animated` 29 | 30 | This can be created using the `createAnimated` method, given an object of type 31 | `t`. 32 | 33 | ```reason 34 | createAnimated: t => animated 35 | ``` 36 | -------------------------------------------------------------------------------- /docs/MapView.md: -------------------------------------------------------------------------------- 1 | # `MapView` Component API 2 | 3 | ## Props 4 | 5 | | Prop Name
and Type | Notes | 6 | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `provider:`
\[ | `` `google `` \] | To specify the map framework to use.

Pass `` `google `` for GoogleMaps, otherwise omit the prop to use the native map framework (`MapKit` in iOS and `GoogleMaps` in android). | 8 | | `region:`
`Region.t` | The region to be displayed by the map.

The region is defined by the center coordinates and the span of coordinates to display. | 9 | | `initialRegion:`
`Region.t` | The initial region to be displayed by the map. Use this prop instead of `region` only if you don't want to control the viewport of the map besides the initial region.

Changing this prop after the component has mounted will not result in a region change.

This is similar to the `initialValue` prop of a text input. | 10 | | `camera:`
`camera` | The camera view the map should display. If you use this, the `region` prop is ignored. | 11 | | `initialCamera:`
`camera` | Like `initialRegion`, use this prop instead of `camera` only if you don't want to control the viewport of the map besides the initial camera setting.

Changing this prop after the component has mounted will not result in a region change.

This is similar to the `initialValue` prop of a text input. | 12 | | `mapPadding:`
`edgePadding` | Adds custom padding to each side of the map. Useful when map elements/markers are obscured. | 13 | | `paddingAdjustmentBehavior`:
\[
| `` `always ``
| `` `automatic ``
| `` `never `` \] | _GoogleMaps on iOS only_
Indicates how/when to affect padding with safe area insets

**default value**: `` `never `` | 14 | | `liteMode:`
`bool` | _Android only_
Enable lite mode.

**default value**: `false` | 15 | | `mapType`:
\[
| `` `standard ``
| `` `satellite ``
| `` `hybrid ``
| `` `none ``
| `` `terrain ``
| `` `mutedStandard `` \] | The map type to be displayed.

- `` `standard ``: standard road map
- `` `none ``: no map (Not available on MapKit)
- `` `satellite ``: satellite view
- `` `hybrid ``: satellite view with roads and points of interest overlayed
- `` `terrain ``: topographic view (Android only)
- `` `mutedStandard ``: more subtle, makes markers/lines pop more (iOS 11.0+ only)

**default value**: `` `standard `` | 16 | | `customMapStyle: array(Js.Json.t)` | Adds custom styling to the map component. See [README](https://github.com/react-native-community/react-native-maps#customizing-the-map-style) for more information. | 17 | | `showsUserLocation:`
`bool` | If `true` the app will ask for the user's location.
**NOTE**: You need to add `NSLocationWhenInUseUsageDescription` key in Info.plist to enable geolocation, otherwise it is going to _fail silently_! You will also need to add an explanation for why you need the users location against `NSLocationWhenInUseUsageDescription` in Info.plist. Otherwise Apple may reject your app submission.

**default value**: `false` | 18 | | `userLocationAnnotationTitle:`
`string` | _iOS only_
The title of the annotation for current user location. This only works if `showsUserLocation` is true.

**default value**: `"My Location"` | 19 | | `userLocationFastestInterval:`
`float` | _Android only_
Fastest interval the application will actively acquire locations. | 20 | | `userLocationPriority`:
\[
| `` `balanced ``
| `` `high ``
| `` `low ``
| `` `passive `` \] | _Android only_
Set power priority of user location tracking.

**default value**: `` `high `` | 21 | | `userLocationUpdateInterval:`
`float` | _Android only_
Interval of user location updates in milliseconds.

**default value**: `5000` | 22 | | `followsUserLocation:`
`bool` | _iOS only_
If `true` the map will focus on the user's location. This only works if `showsUserLocation` is true and the user has shared their location.

**default value**: `false`. | 23 | | `showsMyLocationButton:`
`bool` | If `false` hide the button to move map to the current user's location.

**default value**: `true` | 24 | | `showsPointsOfInterest:`
`bool` | If `false` points of interest won't be displayed on the map.

**default value**: `true` | 25 | | `showsCompass:`
`bool` | If `false` compass won't be displayed on the map.

**default value**: `true` | 26 | | `showsScale:`
`bool` | _Apple Maps only_
A Boolean indicating whether the map shows scale information.

**default value**: `true` | 27 | | `showsBuildings:`
`bool` | A Boolean indicating whether the map displays extruded building information.

**default value**: `true` | 28 | | `showsTraffic:`
`bool` | A Boolean value indicating whether the map displays traffic information.

**default value**: `true` | 29 | | `showsIndoors:`
`bool` | A Boolean indicating whether indoor maps should be enabled.

**default value**: `true` | 30 | | `showsIndoorLevelPicker:`
`bool` | _Google Maps only_
A Boolean indicating whether indoor level picker should be enabled.

**default value**: `false` | 31 | | `zoomEnabled:`
`bool` | If `false` the user won't be able to pinch/zoom the map.

**default value**: `true` | 32 | | `zoomTapEnabled:`
`bool` | _only for Google Maps on iOS_
If `false` the user won't be able to double tap to zoom the map.
**Note:** But it will greatly decrease delay of tap gesture recognition.

**default value**: `true` | 33 | | `zoomControlEnabled:`
`bool` | _Android only_
If `false` the zoom control at the bottom right of the map won't be visible.

**default value**: `true` | 34 | | `minZoomLevel:`
`int` | Minimum zoom value for the map, must be between `0` and `20`

**default value**: `0` | 35 | | `maxZoomLevel:`
`int` | Maximum zoom value for the map, must be between `0` and `20`

**default value**: `20` | 36 | | `rotateEnabled:`
`bool` | If `false` the user won't be able to pinch/rotate the map.

**default value**: `true` | 37 | | `scrollEnabled:`
`bool` | If `false` the user won't be able to change the map region being displayed.

**default value**: `true` | 38 | | `pitchEnabled:`
`bool` | If `false` the user won't be able to adjust the camera’s pitch angle.

**default value**: `true` | 39 | | `toolbarEnabled:`
`bool` | _Android only_
If `false` will hide `Navigate` and `Open in Maps` buttons on marker press

**default value**: `true` | 40 | | `cacheEnabled:`
`bool` | _Apple Maps only_
If `true` map will be cached and displayed as an image instead of being interactable, for performance usage.

**default value**: `false` | 41 | | `loadingEnabled:`
`bool` | If `true` a loading indicator will show while the map is loading.

**default value**: `false` | 42 | | `loadingIndicatorColor:`
`ReactNative.Color.t` | Sets loading indicator color.

**default value**: `"#606060"` | 43 | | `loadingBackgroundColor:`
`ReactNative.Color.t` | Sets loading background color.

**default value**: `"#FFFFFF"` | 44 | | `moveOnMarkerPress:`
`bool` | _Android only_
If `false` the map won't move when a marker is pressed.

**default value**: `true` | 45 | | `legalLabelInsets:`
`ReactNative.View.edgeInsets` | _iOS only_
If set, changes the position of the `Legal` label link from the OS default. | 46 | | `kmlSrc:`
`string` | _Google Maps and Markers only_
The URL from KML file. | 47 | | `compassOffset:`
`point` | _iOS Maps only_
If set, changes the position of the compass. | 48 | | `isAccessibilityElement:`
`bool` | _iOS Maps only_
Determines whether MapView captures VoiceOver touches or forwards them to its children. When `true`, map markers are not visible to VoiceOver.

| 49 | | **default value**: `false` | 50 | 51 | Please also see 52 | [Reason React Native documentation of `View` props](https://reasonml-community.github.io/reason-react-native/en/docs/components/View/) 53 | for additional supported props. 54 | 55 | ## Events 56 | 57 | Events may return no data (`unit`), `Region.t` or 58 | `ReactNative.Event.syntheticEvent('a)`. 59 | 60 | ### Events returning `unit` 61 | 62 | Handler function needs to be of type `unit => unit`. 63 | 64 | | Event Name | Notes | 65 | | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | 66 | | `onCalloutPress` | Callback that is called when a callout is tapped by the user. | 67 | | `onMapReady` | Callback that is called once the map is fully loaded. | 68 | | `onMarkerPress` | Callback that is called when a marker on the map is tapped by the user. | 69 | | `onMarkerSelect` | _iOS only_
Callback that is called when a marker on the map becomes selected. This will be called when the callout for that marker is about to be shown. | 70 | | `onMarkerDeselect` | _iOS only_
Callback that is called when a marker on the map becomes deselected. This will be called when the callout for that marker is about to be hidden. | 71 | 72 | ### Events returning `Region.t` 73 | 74 | Handler function needs to be of type `Region.t => unit`. 75 | 76 | | Event Name | Notes | 77 | | ------------------------ | ------------------------------------------------------------------------------------------------------ | 78 | | `onRegionChange` | Callback that is called continuously when the region changes, such as when a user is dragging the map. | 79 | | `onRegionChangeComplete` | Callback that is called once when the region changes, such as when the user is done moving the map. | 80 | 81 | ### Events returning `ReactNative.Event.syntheticEvent('a)` 82 | 83 | Events listed below return an appropriate instance of the parametrised type 84 | `ReactNative.Event.syntheticEvent('a)` where `'a` is specified in the table 85 | below. Handler function needs to be of type 86 | `ReactNative.Event.syntheticEvent('a) => unit`. 87 | 88 | You will need to use the `##` accessor for each individual key within the 89 | function specified. For example: 90 | 91 | ```reason 92 | onPress={e => Js.Console.warn(e##nativeEvent)} 93 | ``` 94 | 95 | | Event Name | `'a` | Notes | 96 | | ------------------------- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 97 | | `onKmlReady` | `kmlContainer` | Callback that is called once the kml is fully loaded. | 98 | | `onUserLocationChange` | `{. "coordinate": location }` | Callback that is called when the underlying map figures our users current location (coordinate also includes isFromMockProvider value for Android API 18 and above). Make sure **showsUserLocation** is set to _true_. | 99 | | `onPress` | `copos` | Callback that is called when user taps on the map. | 100 | | `onDoublePress` | `copos` | Callback that is called when user double taps on the map. | 101 | | `onPanDrag` | `copos` | Callback that is called when user presses and drags the map.
**NOTE**: for iOS `scrollEnabled` should be set to `false` to trigger the event | 102 | | `onPoiClick` | `poi` | Callback that is called when user click on a POI. | 103 | | `onLongPress` | `copos` | Callback that is called when user makes a "long press" somewhere on the map. | 104 | | `onMarkerDragStart` | `copos` | Callback that is called when the user initiates a drag on a marker (if it is draggable) | 105 | | `onMarkerDrag` | `copos` | Callback called continuously as a marker is dragged | 106 | | `onMarkerDragEnd` | `copos` | Callback that is called when a drag on a marker finishes. This is usually the point you will want to setState on the marker's coordinate again | 107 | | `onIndoorLevelActivated` | `indoorLevel` | Callback that is called when a level on indoor building is activated | 108 | | `onIndoorBuildingFocused` | `indoorBuilding` | Callback that is called when a indoor building is focused/unfocused | 109 | 110 | ## Methods 111 | 112 | Deprecated methods are not supported. 113 | 114 | | Method Name and Type Signature | Notes | 115 | | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 116 | | `getCamera:`
`(element, unit) => camera` | Returns the current camera configuration. | 117 | | `animateCamera:`
`(element, camera, duration) => unit` | Animate the camera to a new view. In JS, you can pass a partial camera object here; any property not given will remain unmodified, however, that is not supported in these bindings and a camera object is required. Do note that any optional arguments not specified in the new object will not be modified. | 118 | | `setCamera:`
`(element, camera, duration) => unit` | Like `animateCamera`, but sets the new view instantly, without an animation. | 119 | | `animateToRegion:`
`(element, Region.t, float) => unit` | duration of the animation should be specified as a `float` | 120 | | `getMapBoundaries:`
`(element, unit) => Js.Promise.t(mapBoundaries)` | Returns current boundaries of the map | 121 | | `setMapBoundaries:`
`(element, mapBoundaries) => unit` | _Google Maps only_
The boundary is defined by the map's center coordinates, not the device's viewport itself. | 122 | | `setIndoorActiveLevelIndex:`
`(element, int) => unit` | `levelIndex` should be specified as an `int` | 123 | | `fitToElements:`
`(element, bool) => unit` | Can specify whether the transition should be animated by the additonal argument | 124 | | `fitToSuppliedMarkers:`
`(element, array(string), fitConfig) => unit` | markerIDs should be specified as `array(string)` If you need to use this in `ComponentDidMount`, make sure you put it in a timeout or it will cause performance problems. | 125 | | `fitToCoordinates:`
`(element, array(LatLng.t), fitConfig) => unit` | Coordinates should be specified as an array of `LatLng.t`. Options may also be specified. If called in `ComponentDidMount` on android, it will cause an exception. It is recommended to be called from the MapView `onLayout` event. | 126 | | `pointForCoordinate:`
`(element, LatLng.t) => Js.Promise.t(point)` | Converts a map coordinate (specified as `LatLng.t`) to a view coordinate (`point`). | 127 | | `coordinateForPoint:`
`(element, point) => Js.Promise.t(LatLng.t)` | Converts a view coordinate (`point`) to a map coordinate (specified as `LatLng.t`). | 128 | | `getMarkersFrames:`
`(element, bool) => Js.Promise.t({. "markerID": {. point: point, frame: frame } })` | _iOS only_
Get markers' centers and frames in view coordinates, can limit to only visible markers by the additional argument. | 129 | 130 | ## Types 131 | 132 | ### `camera` 133 | 134 | ```reason 135 | camera: 136 | ( 137 | ~center: LatLng.t, 138 | ~pitch: float, 139 | ~heading: float, 140 | ~altitude: float=?, 141 | ~zoom: int=?, 142 | unit 143 | ) => 144 | camera 145 | ``` 146 | 147 | Note that `altitude` is only for when `MapKit` is used on iOS and `zoom` is only 148 | for use with Google Maps. Specification of height differs between MapKit on iOS 149 | and Google Maps differ. For a cross-platform app, it is necessary to specify 150 | both the zoom level and the altitude separately. 151 | 152 | ### `location` 153 | 154 | ```reason 155 | type location = { 156 | . 157 | "latitude": float, 158 | "longitude": float, 159 | "altitude": float, 160 | "timestamp": float, 161 | "accuracy": float, 162 | "altitudeAccuracy": float, 163 | "speed": float, 164 | }; 165 | ``` 166 | 167 | `timestamp` is milliseconds elapsed since the epoch 168 | 169 | ### `duration` 170 | 171 | ```reason 172 | duration: (~duration: float) => duration 173 | ``` 174 | 175 | ### `fitConfig` 176 | 177 | ```reason 178 | fitConfig: (~edgePadding: edgePadding, ~animated: bool) => fitConfig 179 | ``` 180 | 181 | ### `frame` 182 | 183 | ```reason 184 | type frame = { 185 | . 186 | "x": float, 187 | "y": float, 188 | "width": float, 189 | "height": float, 190 | }; 191 | ``` 192 | 193 | ### `edgePadding` 194 | 195 | ```reason 196 | edgePadding: 197 | (~top: float, ~right: float, ~bottom: float, ~left: float) => edgePadding 198 | ``` 199 | 200 | ### `mapBoundaries` 201 | 202 | ```reason 203 | type mapBoundaries = { 204 | . 205 | "northEast": LatLng.t, 206 | "southWest": LatLng.t, 207 | } 208 | ``` 209 | 210 | ```reason 211 | mapBoundaries: 212 | (~northEast: LatLng.t, ~southWest: LatLng.t) => 213 | mapBoundaries 214 | ``` 215 | 216 | ### `marker` 217 | 218 | ```reason 219 | marker: 220 | (~id: string, ~coordinate: LatLng.t, ~title: string, ~description: string) => 221 | marker 222 | ``` 223 | 224 | ### `kmlContainer` 225 | 226 | ```reason 227 | type kmlContainer = {. "markers": array(marker)} 228 | ``` 229 | 230 | ### `indoorBuilding` 231 | 232 | ```reason 233 | type indoorBuilding = { 234 | . 235 | "underground": bool, 236 | "activeLevelIndex": int, 237 | "levels": array(indoorLevel), 238 | } 239 | ``` 240 | 241 | ### `indoorLevel` 242 | 243 | ```reason 244 | type indoorLevel = { 245 | . 246 | "activeLevelIndex": int, 247 | "name": string, 248 | "shortName": string, 249 | } 250 | ``` 251 | -------------------------------------------------------------------------------- /docs/MapViewAnimated.md: -------------------------------------------------------------------------------- 1 | # `MapView.Animated` Component API 2 | 3 | Please refer to documentation of the [MapView](docs/MapView.md) component, as 4 | types, props and methods are shared with the exception that the props `region` 5 | and `initialRegion` should be passed objects of type `Region.animated` instead 6 | of `Region.t`. 7 | -------------------------------------------------------------------------------- /docs/Marker.md: -------------------------------------------------------------------------------- 1 | # `Marker` Component API 2 | 3 | ## Props 4 | 5 | | Prop Name
and Type | Notes | 6 | | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `title:`
`string` | The title of the marker. This is only used if the component has no children that are a ``, in which case the default callout behavior will be used, which will show both the `title` and the `description`, if provided. | 8 | | `description:`
`string` | The description of the marker. This is only used if the component has no children that are a ``, in which case the default callout behavior will be used, which will show both the `title` and the `description`, if provided. | 9 | | `image:`
`ReactNative.Image.Source.t` | A custom image to be used as the marker's icon. Only local image resources are allowed to be used. | 10 | | `icon:`
`ReactNative.Image.Source.t` | Marker icon to render (equivalent to `icon` property of GMSMarker Class). | 11 | | `pinColor:`
`string` | If no custom marker view or custom image is provided, the platform default pin will be used, which can be customized by this color. Ignored if a custom marker is being used.

For Android, the set of available colors is limited. Unsupported colors will fall back to red. See [#887](https://github.com/react-community/react-native-maps/issues/887) for more information. | 12 | | `coordinate:`
`LatLng.t` | The coordinate for the marker. | 13 | | `centerOffset:`
`point` | The offset (in points) at which to display the view.

By default, the center point of an annotation view is placed at the coordinate point of the associated annotation. You can use this property to reposition the annotation view as needed. This x and y offset values are measured in points. Positive offset values move the annotation view down and to the right, while negative values move it up and to the left.

For Google Maps, see the `anchor` prop.

**default value**: `{x: 0, y: 0}` | 14 | | `calloutOffset:`
`point` | The offset (in points) at which to place the callout bubble.

This property determines the additional distance by which to move the callout bubble. When this property is set to (0, 0), the anchor point of the callout bubble is placed on the top-center point of the marker view’s frame. Specifying positive offset values moves the callout bubble down and to the right, while specifying negative values moves it up and to the left.

For Google Maps, see the `calloutAnchor` prop.

**default value**: `{x: 0, y: 0}` | 15 | | `anchor:`
`point` | Sets the anchor point for the marker.

The anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface.

The anchor point is specified in the continuous space `[0.0, 1.0] x [0.0, 1.0]`, where `(0, 0)` is the top-left corner of the image, and `(1, 1)` is the bottom-right corner. The anchoring point in a W x H image is the nearest discrete grid point in a (W + 1) x (H + 1) grid, obtained by scaling the then rounding. For example, in a 4 x 2 image, the anchor point (0.7, 0.6) resolves to the grid point at (3, 1).

For MapKit on iOS, see the `centerOffset` prop.

**default value**: `{x: 0.5, y: 1}` | 16 | | `calloutAnchor:`
`point` | Specifies the point in the marker image at which to anchor the callout when it is displayed. This is specified in the same coordinate system as the anchor. See the `anchor` prop for more details.

The default is the top middle of the image.

For MapKit on iOS, see the `calloutOffset` prop.

**default value**: `{x: 0.5, y: 0}` | 17 | | `flat:`
`bool` | Sets whether this marker should be flat against the map true or a billboard facing the camera.

**default value**: `false` | 18 | | `identifier:`
`string` | An identifier used to reference this marker at a later date. | 19 | | `isPreselected:`
`bool` | _Apple Maps only_
When true, the marker will be pre-selected and can be dragged without a tap to set focus on it.

**default value**: `false` | 20 | | `rotation:`
`float` | A float number indicating marker's rotation angle, in degrees.

**default value**: `0.0` | 21 | | `draggable:`
`bool` | In JS, this is a non-value based prop. Set `draggable=bool` to enable dragging (re-positioning) and omit to disable it. | 22 | | `tracksViewChanges:`
`bool` | Sets whether this marker should track view changes. It's recommended to turn it off whenever it's possible to improve custom marker performance.

**default value**: `true` | 23 | | `tracksInfoWindowChanges:`
`bool` | _iOS Google Maps only_
Sets whether this marker should track view changes in info window. Enabling it will let marker change content of info window after first render pass, but will lead to decreased performance, so it's recommended to disable it whenever you don't need it.

**default value**: `false` | 24 | | `stopPropagation:`
`bool` | _iOS only_
Sets whether this marker should propagate `onPress` events. If enabled, `onPress` event will not be triggered for the parent `MapView`. **Note**: Android does not propagate `onPress` events. See [#1132](https://github.com/react-community/react-native-maps/issues/1132) for more information.

**default value**: `false` | 25 | | `opacity:`
`float` | The marker's opacity between `0.0` and `1.0`.

**default value**: `1.0` | 26 | 27 | ## Events 28 | 29 | Events may return no data (`unit`) or `ReactNative.Event.syntheticEvent(copos)`. 30 | 31 | ### Events returning `unit` 32 | 33 | Handler function needs to be of type `unit => unit`. 34 | 35 | | Event Name | Notes | 36 | | ---------------- | ------------------------------------------------------------ | 37 | | `onCalloutPress` | Callback that is called when the user taps the callout view. | 38 | 39 | ### Events returning `ReactNative.Event.syntheticEvent(copos)` 40 | 41 | Handler function needs to be of type 42 | `ReactNative.Event.syntheticEvent(copos) => unit`. You will need to use the `##` 43 | accessor for each individual key within the function specified. For example: 44 | 45 | ```reason 46 | onPress={e => Js.Console.warn(e##nativeEvent)} 47 | ``` 48 | 49 | | Event Name | Notes | 50 | | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | 51 | | `onPress` | Callback that is called when the user presses on the marker | 52 | | `onSelect` | _iOS only_
Callback that is called when the user selects the marker, before the callout is shown. | 53 | | `onDeselect` | _iOS only_
Callback that is called when the marker is deselected, before the callout is hidden. | 54 | | `onDragStart` | Callback that is called when the user initiates a drag on this marker (if it is draggable) | 55 | | `onDrag` | Callback called continuously as the marker is dragged | 56 | | `onDragEnd` | Callback that is called when a drag on this marker finishes. This is usually the point you will want to setState on the marker's coordinate again | 57 | 58 | ## Methods 59 | 60 | | Method Name
and
Type Signature | Notes | 61 | | ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | 62 | | `showCallout:`
`(element, unit) => unit` | Shows the callout for this marker | 63 | | `hideCallout:`
`(element, unit) => unit` | Hides the callout for this marker | 64 | | `redrawCallout:`
`(element, unit) => unit` | Causes a redraw of the marker's callout. Useful for Google Maps on iOS.
**Note**: iOS only. | 65 | | `animateMarkerToCoordinate:`
`(element, LatLng.t, float) => unit` | _Android only_
Animates marker movement. Coordinate should be specified as `LatLng.t` and the duration for the animation should be specified as a `float` | 66 | | `redraw:`
`(element, unit) => unit` | Causes a redraw of the marker. Useful when there are updates to the marker and `tracksViewChanges` comes with a cost that is too high. | 67 | 68 | ## Child Components 69 | 70 | Child components can be added within a `Marker` and rendered content will 71 | replace the marker symbol. This is a way of creating custom markers and allowing 72 | use of native SVGs. 73 | 74 | Example: 75 | 76 | ```reason 77 | open ReactNative; 78 | open ReactNativeMaps; 79 | 80 | 83 | Style.dp, ())> 84 | "SF" -> React.string 85 | 86 | 87 | ``` 88 | -------------------------------------------------------------------------------- /docs/MarkerAnimated.md: -------------------------------------------------------------------------------- 1 | # `Marker.Animated` Component API 2 | 3 | Please refer to documentation of the [Marker](docs/Marker.md) component, as 4 | types, props and methods are shared with the exception that the prop 5 | `coordinate` should be passed objects of type `LatLng.animated` instead of 6 | `LatLng.t`. 7 | -------------------------------------------------------------------------------- /docs/Overlay.md: -------------------------------------------------------------------------------- 1 | # `Overlay` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | --------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------- | 7 | | `image` | `ReactNative.Image.Source.t` | A custom image to be used as the overlay. Only required local image resources and uri (as for images located in the net) are allowed to be used. | 8 | | `bounds` | `(LatLng.t, LatLng.t)` | | The coordinates for the image (top-left corner, bottom-right corner). | 9 | | `opacity` | `float` | _Google Maps only_ Opacity of the overlay. | 10 | 11 | | `tappable` | `bool` | `false` | `Android only` to allow an overlay to be 12 | tappable and use the onPress function. | 13 | 14 | ## Events 15 | 16 | | Event Name | Returns | Notes | 17 | | ---------- | ----------------------------------------------------------------- | --------------------------------------------------------------------------- | 18 | | `onPress` | `{. "action": string, "coordinate": LatLng.t, "position": point}` | `Android only` Callback that is called when the user presses on the overlay | 19 | -------------------------------------------------------------------------------- /docs/Polygon.md: -------------------------------------------------------------------------------- 1 | # `Polygon` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | ----------------- | -------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `coordinates` | `array(LatLng.t)` | (Required) | An array of coordinates to describe the polygon | 8 | | `holes` | `array(array(LatLng.t))` | | A 2d array of coordinates to describe holes of the polygon where each hole has at least 3 points. | 9 | | `strokeWidth` | `float` | `1.0` | The stroke width to use for the path. | 10 | | `strokeColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The stroke color to use for the path. | 11 | | `fillColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The fill color to use for the path. | 12 | | `lineCap` | \[ \| \`butt \| \`round \| \`square \] | \`round | The line cap style to apply to the open ends of the path. | 13 | | `lineJoin` | \[ \| \`bevel \| \`miter \| \`round \] | | The line join style to apply to corners of the path. | 14 | | `miterLimit` | `int` | `10` | The limiting value that helps avoid spikes at junctions between connected line segments. The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If the ratio of miter length (diagonal length of the miter join) to line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit is `10`, which results in the conversion of miters whose angle at the joint is less than 11 degrees. | 15 | | `geodesic` | `bool` | | to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection. A geodesic is the shortest path between two points on the Earth's surface. The geodesic curve is constructed assuming the Earth is a sphere. | 16 | | `lineDashPhase` | `int` | `0` | (iOS only) The offset (in points) at which to start drawing the dash pattern. Use this property to start drawing a dashed line partway through a segment or gap. For example, a phase value of `6` for the pattern `[| 5, 2, 3, 2|]` would cause drawing to begin in the middle of the first gap. | 17 | | `lineDashPattern` | `array(int)` | | (iOS only) An array of numbers specifying the dash pattern to use for the path. The array contains one or more numbers that indicate lengths (measured in points) of the line segments and gaps in the pattern. Values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on. | 18 | | `tappable` | `bool` | false | to allow a polygon to be tappable and enable the onPress event. | 19 | 20 | ## Events 21 | 22 | | Event Name | Returns | Notes | 23 | | ---------- | ------- | ------------------------------------------------------------ | 24 | | `onPress` | `unit` | Callback that is called when the user presses on the polygon | 25 | -------------------------------------------------------------------------------- /docs/Polyline.md: -------------------------------------------------------------------------------- 1 | # `Polyline` Component API 2 | 3 | ## Props 4 | 5 | | Prop | Type | Default | Note | 6 | | ----------------- | -------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 7 | | `coordinates` | `array(LatLng.t)` | (Required) | An array of coordinates to describe the polyline | 8 | | `strokeWidth` | `float` | `1.0` | The stroke width to use for the path. | 9 | | `strokeColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The stroke color to use for the path. | 10 | | `strokeColors` | array(`ReactNative.Color.t`) | | The stroke colors to use for the path (iOS only). Must be the same length as coordinates. | 11 | | `fillColor` | `ReactNative.Color.t` | `#000`, `rgba(r,g,b,0.5)` | The fill color to use for the path. | 12 | | `lineCap` | \[ \| \`butt \| \`round \| \`square \] | \`round | The line cap style to apply to the open ends of the path. | 13 | | `lineJoin` | \[ \| \`bevel \| \`miter \| \`round \] | | The line join style to apply to corners of the path. | 14 | | `miterLimit` | `int` | `10` | The limiting value that helps avoid spikes at junctions between connected line segments. The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If the ratio of miter length (diagonal length of the miter join) to line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit is `10`, which results in the conversion of miters whose angle at the joint is less than 11 degrees. | 15 | | `geodesic` | `bool` | | to indicate whether to draw each segment of the line as a geodesic as opposed to straight lines on the Mercator projection. A geodesic is the shortest path between two points on the Earth's surface. The geodesic curve is constructed assuming the Earth is a sphere. | 16 | | `lineDashPhase` | `int` | `0` | (iOS only) The offset (in points) at which to start drawing the dash pattern. Use this property to start drawing a dashed line partway through a segment or gap. For example, a phase value of `6` for the pattern `[| 5, 2, 3, 2|]` would cause drawing to begin in the middle of the first gap. | 17 | | `lineDashPattern` | `array(int)` | | (iOS only) An array of numbers specifying the dash pattern to use for the path. The array contains one or more numbers that indicate lengths (measured in points) of the line segments and gaps in the pattern. Values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on. | 18 | | `tappable` | `bool` | false | to allow a polyline to be tappable and enable the onPress event. | 19 | 20 | ## Events 21 | 22 | | Event Name | Returns | Notes | 23 | | ---------- | ------- | ------------------------------------------------------------- | 24 | | `onPress` | `unit` | Callback that is called when the user presses on the polyline | 25 | -------------------------------------------------------------------------------- /docs/Region.md: -------------------------------------------------------------------------------- 1 | # `Region` 2 | 3 | ## Type 4 | 5 | ### `t` 6 | 7 | This type needs to be created, as well as consumed. When the type is returned, 8 | individual keys may be accessed using the `##` accessor. 9 | 10 | ```reason 11 | type t = { 12 | . 13 | "latitude": float, 14 | "longitude": float, 15 | "latitudeDelta": float, 16 | "longitudeDelta": float, 17 | }; 18 | ``` 19 | 20 | ```reason 21 | create: 22 | ( 23 | ~latitude: float, 24 | ~longitude: float, 25 | ~latitudeDelta: float, 26 | ~longitudeDelta: float 27 | ) => 28 | t 29 | ``` 30 | 31 | `latitude` and `longitude` are self explanatory while `latitudeDelta` and 32 | `longitudeDelta` may not. In 33 | [Apple Developer documentation](https://developer.apple.com/reference/mapkit/mkcoordinatespan/1452417-latitudedelta), 34 | `latitudeDelta` is explained as: 35 | 36 | > The amount of north-to-south distance (measured in degrees) to display on the 37 | > map. Unlike longitudinal distances, which vary based on the latitude, one 38 | > degree of latitude is always approximately 111 kilometers (69 miles). 39 | 40 | A 41 | [visual explanation](https://stackoverflow.com/questions/36685372/how-to-zoom-in-out-in-react-native-map/36688156#36688156) 42 | may be found on `stackoverflow`. 43 | 44 | ### `animated` 45 | 46 | This can be created using the `createAnimated` method, given an object of type 47 | `t`. 48 | 49 | ```reason 50 | createAnimated: t => animated 51 | ``` 52 | -------------------------------------------------------------------------------- /docs/Shared.md: -------------------------------------------------------------------------------- 1 | # `Shared` 2 | 3 | ## Types 4 | 5 | ### `point` 6 | 7 | This type needs to be created, as well as consumed. When the type is returned, 8 | individual keys may be accessed using the `##` accessor. 9 | 10 | ```reason 11 | type point = { 12 | . 13 | "y": float, 14 | "x": float, 15 | }; 16 | ``` 17 | 18 | ```reason 19 | point: (~x: float, ~y: float) => point 20 | ``` 21 | 22 | ### `copos` 23 | 24 | ```reason 25 | type copos = { 26 | . 27 | "coordinate": LatLng.t, 28 | "position": point, 29 | }; 30 | ``` 31 | 32 | ### `poi` 33 | 34 | ```reason 35 | type poi = { 36 | . 37 | "coordinate": LatLng.t, 38 | "position": point, 39 | "placeId": string, 40 | "name": string, 41 | }; 42 | ``` 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reason-react-native-maps", 3 | "version": "0.27.0", 4 | "publishConfig": { 5 | "access": "public" 6 | }, 7 | "peerDependencies": { 8 | "react-native-maps": "~0.27.0" 9 | }, 10 | "author": "sgny (https://github.com/sgny)", 11 | "repository": "https://github.com/sgny/reason-react-native-maps.git", 12 | "license": "MIT", 13 | "keywords": [ 14 | "reason", 15 | "reasonml", 16 | "bucklescript", 17 | "react-native", 18 | "react-native-maps" 19 | ], 20 | "files": [ 21 | "*", 22 | "!.DS_Store", 23 | "!**/*.bs.js", 24 | "!.merlin", 25 | "!lib/bs", 26 | "!lib/ocaml", 27 | "!.gitignore", 28 | "!**/debug.log", 29 | "!**/build.yml" 30 | ], 31 | "scripts": { 32 | "format:most": "prettier --write \"**/*.{md,json,js,css}\"", 33 | "format:re": "find . -name \"*.re\" -or -name \"*.rei\" | grep -v \"node_modules\" | xargs bsrefmt --in-place", 34 | "format": "yarn format:most && yarn format:re", 35 | "re:start": "bsb -make-world -w", 36 | "re:build": "bsb -make-world", 37 | "re:clean-build": "bsb -clean-world -make-world", 38 | "start": "yarn re:start", 39 | "build": "yarn re:build", 40 | "test": "yarn re:clean-build" 41 | }, 42 | "devDependencies": { 43 | "bs-platform": "^8.2.0", 44 | "husky": "^1.3.0", 45 | "lint-staged": "^8.1.0", 46 | "prettier": "^1.18.0", 47 | "reason-react": "^0.9.1", 48 | "reason-react-native": "^0.62.3" 49 | }, 50 | "prettier": { 51 | "trailingComma": "all", 52 | "proseWrap": "always" 53 | }, 54 | "lint-staged": { 55 | "*.{md,json,js,css}": [ 56 | "prettier --write", 57 | "git add" 58 | ], 59 | "*.{re,rei}": [ 60 | "bsrefmt --in-place", 61 | "git add" 62 | ] 63 | }, 64 | "husky": { 65 | "hooks": { 66 | "pre-commit": "lint-staged" 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Callout.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js"); 4 | 5 | var OnPressEvent = Event$ReactNative.SyntheticEvent({}); 6 | 7 | exports.OnPressEvent = OnPressEvent; 8 | /* OnPressEvent Not a pure module */ 9 | -------------------------------------------------------------------------------- /src/Callout.re: -------------------------------------------------------------------------------- 1 | type action = string; 2 | 3 | [@bs.inline] 4 | let calloutPress = "callout-press"; 5 | 6 | [@bs.inline] 7 | let markerOverlayPress = "marker-overlay-press"; 8 | 9 | module OnPressEvent = 10 | ReactNative.Event.SyntheticEvent({ 11 | type _payload = {. action: action}; 12 | }); 13 | 14 | [@react.component] [@bs.module "react-native-maps/lib/components/MapCallout"] 15 | // supports view props 16 | external make: 17 | ( 18 | ~tooltip: bool=?, 19 | ~alphaHitTest: bool=?, 20 | ~onPress: OnPressEvent.t => unit=?, 21 | // View props 22 | ~accessibilityComponentType: [@bs.string] [ 23 | | `none 24 | | `button 25 | | `radiobutton_checked 26 | | `radiobutton_unchecked 27 | ] 28 | =?, 29 | ~accessibilityElementsHidden: bool=?, 30 | ~accessibilityHint: string=?, 31 | ~accessibilityIgnoresInvertColors: bool=?, 32 | ~accessibilityLabel: string=?, 33 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 34 | ~accessibilityRole: [@bs.string] [ 35 | | `none 36 | | `button 37 | | `link 38 | | `search 39 | | `image 40 | | `keyboardkey 41 | | `text 42 | | `adjustable 43 | | `header 44 | | `summary 45 | | `imagebutton 46 | ] 47 | =?, 48 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 49 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 50 | ~accessibilityViewIsModal: bool=?, 51 | ~accessible: bool=?, 52 | ~collapsable: bool=?, 53 | ~hitSlop: ReactNative.View.edgeInsets=?, 54 | ~importantForAccessibility: [@bs.string] [ 55 | | `auto 56 | | `yes 57 | | `no 58 | | [@bs.as "no-hide-descendants"] 59 | `noHideDescendants 60 | ] 61 | =?, 62 | ~nativeID: string=?, 63 | ~needsOffscreenAlphaCompositing: bool=?, 64 | ~onAccessibilityEscape: unit => unit=?, 65 | ~onAccessibilityTap: unit => unit=?, 66 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 67 | ~onMagicTap: unit => unit=?, 68 | // Gesture Responder props 69 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 70 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 71 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 74 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 75 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 76 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 77 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 78 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 79 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 80 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 81 | ~pointerEvents: [@bs.string] [ 82 | | `auto 83 | | `none 84 | | [@bs.as "box-none"] `boxNone 85 | | [@bs.as "box-only"] `boxOnly 86 | ] 87 | =?, 88 | ~removeClippedSubviews: bool=?, 89 | ~renderToHardwareTextureAndroid: bool=?, 90 | ~shouldRasterizeIOS: bool=?, 91 | ~style: ReactNative.Style.t=?, 92 | ~testID: string=?, 93 | ~children: React.element=? 94 | ) => 95 | React.element = 96 | "default"; 97 | -------------------------------------------------------------------------------- /src/CalloutSubview.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js"); 4 | 5 | var OnPressEvent = Event$ReactNative.SyntheticEvent({}); 6 | 7 | exports.OnPressEvent = OnPressEvent; 8 | /* OnPressEvent Not a pure module */ 9 | -------------------------------------------------------------------------------- /src/CalloutSubview.re: -------------------------------------------------------------------------------- 1 | type action = string; 2 | 3 | [@bs.inline] 4 | let calloutInsidePress = "callout-inside-press"; 5 | 6 | [@bs.inline] 7 | let markerInsideOverlayPress = "marker-inside-overlay-press"; 8 | 9 | module OnPressEvent = 10 | ReactNative.Event.SyntheticEvent({ 11 | type _payload = {. action: action}; 12 | }); 13 | 14 | [@react.component] 15 | [@bs.module "react-native-maps/lib/components/MapCalloutSubview"] 16 | // supports view props 17 | external make: 18 | ( 19 | ~onPress: OnPressEvent.t => unit=?, 20 | // View props 21 | ~accessibilityComponentType: [@bs.string] [ 22 | | `none 23 | | `button 24 | | `radiobutton_checked 25 | | `radiobutton_unchecked 26 | ] 27 | =?, 28 | ~accessibilityElementsHidden: bool=?, 29 | ~accessibilityHint: string=?, 30 | ~accessibilityIgnoresInvertColors: bool=?, 31 | ~accessibilityLabel: string=?, 32 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 33 | ~accessibilityRole: [@bs.string] [ 34 | | `none 35 | | `button 36 | | `link 37 | | `search 38 | | `image 39 | | `keyboardkey 40 | | `text 41 | | `adjustable 42 | | `header 43 | | `summary 44 | | `imagebutton 45 | ] 46 | =?, 47 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 48 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 49 | ~accessibilityViewIsModal: bool=?, 50 | ~accessible: bool=?, 51 | ~collapsable: bool=?, 52 | ~hitSlop: ReactNative.View.edgeInsets=?, 53 | ~importantForAccessibility: [@bs.string] [ 54 | | `auto 55 | | `yes 56 | | `no 57 | | [@bs.as "no-hide-descendants"] 58 | `noHideDescendants 59 | ] 60 | =?, 61 | ~nativeID: string=?, 62 | ~needsOffscreenAlphaCompositing: bool=?, 63 | ~onAccessibilityEscape: unit => unit=?, 64 | ~onAccessibilityTap: unit => unit=?, 65 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 66 | ~onMagicTap: unit => unit=?, 67 | // Gesture Responder props 68 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 69 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 70 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 71 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 74 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 75 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 76 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 77 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 78 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 79 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 80 | ~pointerEvents: [@bs.string] [ 81 | | `auto 82 | | `none 83 | | [@bs.as "box-none"] `boxNone 84 | | [@bs.as "box-only"] `boxOnly 85 | ] 86 | =?, 87 | ~removeClippedSubviews: bool=?, 88 | ~renderToHardwareTextureAndroid: bool=?, 89 | ~shouldRasterizeIOS: bool=?, 90 | ~style: ReactNative.Style.t=?, 91 | ~testID: string=?, 92 | ~children: React.element=? 93 | ) => 94 | React.element = 95 | "default"; 96 | -------------------------------------------------------------------------------- /src/Circle.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Circle.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapCircle"] 2 | external make: 3 | ( 4 | ~center: LatLng.t, 5 | ~radius: float, 6 | ~strokeWidth: float=?, 7 | ~strokeColor: ReactNative.Color.t=?, 8 | ~fillColor: ReactNative.Color.t=?, 9 | ~zIndex: int=?, 10 | ~lineCap: [@bs.string] [ | `butt | `round | `square]=?, 11 | ~lineJoin: [@bs.string] [ | `bevel | `miter | `round]=?, 12 | ~miterLimit: int=?, 13 | ~geodesic: bool=?, 14 | ~lineDashPhase: int=?, 15 | ~lineDashPattern: array(int)=?, 16 | // View props 17 | ~accessibilityComponentType: [@bs.string] [ 18 | | `none 19 | | `button 20 | | `radiobutton_checked 21 | | `radiobutton_unchecked 22 | ] 23 | =?, 24 | ~accessibilityElementsHidden: bool=?, 25 | ~accessibilityHint: string=?, 26 | ~accessibilityIgnoresInvertColors: bool=?, 27 | ~accessibilityLabel: string=?, 28 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 29 | ~accessibilityRole: [@bs.string] [ 30 | | `none 31 | | `button 32 | | `link 33 | | `search 34 | | `image 35 | | `keyboardkey 36 | | `text 37 | | `adjustable 38 | | `header 39 | | `summary 40 | | `imagebutton 41 | ] 42 | =?, 43 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 44 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 45 | ~accessibilityViewIsModal: bool=?, 46 | ~accessible: bool=?, 47 | ~collapsable: bool=?, 48 | ~hitSlop: ReactNative.View.edgeInsets=?, 49 | ~importantForAccessibility: [@bs.string] [ 50 | | `auto 51 | | `yes 52 | | `no 53 | | [@bs.as "no-hide-descendants"] 54 | `noHideDescendants 55 | ] 56 | =?, 57 | ~nativeID: string=?, 58 | ~needsOffscreenAlphaCompositing: bool=?, 59 | ~onAccessibilityEscape: unit => unit=?, 60 | ~onAccessibilityTap: unit => unit=?, 61 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 62 | ~onMagicTap: unit => unit=?, 63 | // Gesture Responder props 64 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 65 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 66 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 67 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 68 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 69 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 70 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 71 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 74 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 75 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 76 | ~pointerEvents: [@bs.string] [ 77 | | `auto 78 | | `none 79 | | [@bs.as "box-none"] `boxNone 80 | | [@bs.as "box-only"] `boxOnly 81 | ] 82 | =?, 83 | ~removeClippedSubviews: bool=?, 84 | ~renderToHardwareTextureAndroid: bool=?, 85 | ~shouldRasterizeIOS: bool=?, 86 | ~style: ReactNative.Style.t=?, 87 | ~testID: string=?, 88 | ~children: React.element=? 89 | ) => 90 | React.element = 91 | "default"; 92 | -------------------------------------------------------------------------------- /src/Geojson.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | function Make(T) { 4 | return {}; 5 | } 6 | 7 | exports.Make = Make; 8 | /* No side effect */ 9 | -------------------------------------------------------------------------------- /src/Geojson.re: -------------------------------------------------------------------------------- 1 | module Make = (T: {type t;}) => { 2 | [@react.component] [@bs.module "react-native-maps/lib/components/Geojson"] 3 | external make: (~geojson: T.t) => React.element = "default"; 4 | }; 5 | -------------------------------------------------------------------------------- /src/Heatmap.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Heatmap.re: -------------------------------------------------------------------------------- 1 | type gradient; 2 | 3 | [@bs.obj] 4 | external gradient: 5 | ( 6 | ~colors: array(ReactNative.Color.t), 7 | ~startPoints: array(float), 8 | ~colorMapSize: int=?, 9 | unit 10 | ) => 11 | gradient; 12 | 13 | [@react.component] [@bs.module "react-native-maps/lib/components/MapHeatmap"] 14 | external make: 15 | ( 16 | ~points: array(LatLng.weighted), 17 | ~radius: int=?, 18 | ~opacity: float=?, 19 | ~gradient: gradient=?, 20 | // View props 21 | ~accessibilityComponentType: [@bs.string] [ 22 | | `none 23 | | `button 24 | | `radiobutton_checked 25 | | `radiobutton_unchecked 26 | ] 27 | =?, 28 | ~accessibilityElementsHidden: bool=?, 29 | ~accessibilityHint: string=?, 30 | ~accessibilityIgnoresInvertColors: bool=?, 31 | ~accessibilityLabel: string=?, 32 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 33 | ~accessibilityRole: [@bs.string] [ 34 | | `none 35 | | `button 36 | | `link 37 | | `search 38 | | `image 39 | | `keyboardkey 40 | | `text 41 | | `adjustable 42 | | `header 43 | | `summary 44 | | `imagebutton 45 | ] 46 | =?, 47 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 48 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 49 | ~accessibilityViewIsModal: bool=?, 50 | ~accessible: bool=?, 51 | ~collapsable: bool=?, 52 | ~hitSlop: ReactNative.View.edgeInsets=?, 53 | ~importantForAccessibility: [@bs.string] [ 54 | | `auto 55 | | `yes 56 | | `no 57 | | [@bs.as "no-hide-descendants"] 58 | `noHideDescendants 59 | ] 60 | =?, 61 | ~nativeID: string=?, 62 | ~needsOffscreenAlphaCompositing: bool=?, 63 | ~onAccessibilityEscape: unit => unit=?, 64 | ~onAccessibilityTap: unit => unit=?, 65 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 66 | ~onMagicTap: unit => unit=?, 67 | // Gesture Responder props 68 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 69 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 70 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 71 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 74 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 75 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 76 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 77 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 78 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 79 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 80 | ~pointerEvents: [@bs.string] [ 81 | | `auto 82 | | `none 83 | | [@bs.as "box-none"] `boxNone 84 | | [@bs.as "box-only"] `boxOnly 85 | ] 86 | =?, 87 | ~removeClippedSubviews: bool=?, 88 | ~renderToHardwareTextureAndroid: bool=?, 89 | ~shouldRasterizeIOS: bool=?, 90 | ~style: ReactNative.Style.t=?, 91 | ~testID: string=?, 92 | ~children: React.element=? 93 | ) => 94 | React.element = 95 | "default"; 96 | -------------------------------------------------------------------------------- /src/LatLng.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/LatLng.re: -------------------------------------------------------------------------------- 1 | type t = { 2 | . 3 | "latitude": float, 4 | "longitude": float, 5 | }; 6 | 7 | [@bs.obj] external create: (~latitude: float, ~longitude: float) => t = ""; 8 | 9 | type weighted; 10 | 11 | [@bs.obj] 12 | external weighted: 13 | (~latitude: float, ~longitude: float, ~weight: float=?, unit) => weighted = 14 | ""; 15 | 16 | type animated; 17 | 18 | [@bs.new] [@bs.module "react-native-maps/lib/components/AnimatedRegion"] 19 | external createAnimated: t => animated = "default"; 20 | -------------------------------------------------------------------------------- /src/LocalTile.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/LocalTile.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapLocalTile"] 2 | external make: 3 | ( 4 | ~pathTemplate: string, 5 | ~zIndex: int=?, 6 | ~tileSize: int=?, 7 | // View props 8 | ~accessibilityComponentType: [@bs.string] [ 9 | | `none 10 | | `button 11 | | `radiobutton_checked 12 | | `radiobutton_unchecked 13 | ] 14 | =?, 15 | ~accessibilityElementsHidden: bool=?, 16 | ~accessibilityHint: string=?, 17 | ~accessibilityIgnoresInvertColors: bool=?, 18 | ~accessibilityLabel: string=?, 19 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 20 | ~accessibilityRole: [@bs.string] [ 21 | | `none 22 | | `button 23 | | `link 24 | | `search 25 | | `image 26 | | `keyboardkey 27 | | `text 28 | | `adjustable 29 | | `header 30 | | `summary 31 | | `imagebutton 32 | ] 33 | =?, 34 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 35 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 36 | ~accessibilityViewIsModal: bool=?, 37 | ~accessible: bool=?, 38 | ~collapsable: bool=?, 39 | ~hitSlop: ReactNative.View.edgeInsets=?, 40 | ~importantForAccessibility: [@bs.string] [ 41 | | `auto 42 | | `yes 43 | | `no 44 | | [@bs.as "no-hide-descendants"] 45 | `noHideDescendants 46 | ] 47 | =?, 48 | ~nativeID: string=?, 49 | ~needsOffscreenAlphaCompositing: bool=?, 50 | ~onAccessibilityEscape: unit => unit=?, 51 | ~onAccessibilityTap: unit => unit=?, 52 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 53 | ~onMagicTap: unit => unit=?, 54 | // Gesture Responder props 55 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 56 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 57 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 58 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 59 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 60 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 61 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 62 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 63 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 64 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 65 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 66 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 67 | ~pointerEvents: [@bs.string] [ 68 | | `auto 69 | | `none 70 | | [@bs.as "box-none"] `boxNone 71 | | [@bs.as "box-only"] `boxOnly 72 | ] 73 | =?, 74 | ~removeClippedSubviews: bool=?, 75 | ~renderToHardwareTextureAndroid: bool=?, 76 | ~shouldRasterizeIOS: bool=?, 77 | ~style: ReactNative.Style.t=?, 78 | ~testID: string=?, 79 | ~children: React.element=? 80 | ) => 81 | React.element = 82 | "default"; 83 | -------------------------------------------------------------------------------- /src/MapView.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var ReactNative = require("react-native"); 4 | var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js"); 5 | var MapView = require("react-native-maps/lib/components/MapView"); 6 | 7 | function Make(T) { 8 | var MapViewEvent = Event$ReactNative.SyntheticEvent({}); 9 | var UserLocationChangeEvent = Event$ReactNative.SyntheticEvent({}); 10 | var PoiClickEvent = Event$ReactNative.SyntheticEvent({}); 11 | var MarkerDragEvent = Event$ReactNative.SyntheticEvent({}); 12 | var MarkerDragStartEndEvent = Event$ReactNative.SyntheticEvent({}); 13 | var KmlReadyEvent = Event$ReactNative.SyntheticEvent({}); 14 | var IndoorLevelActivatedEvent = Event$ReactNative.SyntheticEvent({}); 15 | var IndoorBuildingFocusedEvent = Event$ReactNative.SyntheticEvent({}); 16 | return { 17 | MapViewEvent: MapViewEvent, 18 | UserLocationChangeEvent: UserLocationChangeEvent, 19 | PoiClickEvent: PoiClickEvent, 20 | MarkerDragEvent: MarkerDragEvent, 21 | MarkerDragStartEndEvent: MarkerDragStartEndEvent, 22 | KmlReadyEvent: KmlReadyEvent, 23 | IndoorLevelActivatedEvent: IndoorLevelActivatedEvent, 24 | IndoorBuildingFocusedEvent: IndoorBuildingFocusedEvent, 25 | }; 26 | } 27 | 28 | var MapViewEvent = Event$ReactNative.SyntheticEvent({}); 29 | 30 | var UserLocationChangeEvent = Event$ReactNative.SyntheticEvent({}); 31 | 32 | var PoiClickEvent = Event$ReactNative.SyntheticEvent({}); 33 | 34 | var MarkerDragEvent = Event$ReactNative.SyntheticEvent({}); 35 | 36 | var MarkerDragStartEndEvent = Event$ReactNative.SyntheticEvent({}); 37 | 38 | var KmlReadyEvent = Event$ReactNative.SyntheticEvent({}); 39 | 40 | var IndoorLevelActivatedEvent = Event$ReactNative.SyntheticEvent({}); 41 | 42 | var IndoorBuildingFocusedEvent = Event$ReactNative.SyntheticEvent({}); 43 | 44 | var MapViewEvent$1 = Event$ReactNative.SyntheticEvent({}); 45 | 46 | var UserLocationChangeEvent$1 = Event$ReactNative.SyntheticEvent({}); 47 | 48 | var PoiClickEvent$1 = Event$ReactNative.SyntheticEvent({}); 49 | 50 | var MarkerDragEvent$1 = Event$ReactNative.SyntheticEvent({}); 51 | 52 | var MarkerDragStartEndEvent$1 = Event$ReactNative.SyntheticEvent({}); 53 | 54 | var KmlReadyEvent$1 = Event$ReactNative.SyntheticEvent({}); 55 | 56 | var IndoorLevelActivatedEvent$1 = Event$ReactNative.SyntheticEvent({}); 57 | 58 | var IndoorBuildingFocusedEvent$1 = Event$ReactNative.SyntheticEvent({}); 59 | 60 | var make = ReactNative.Animated.createAnimatedComponent(MapView.default); 61 | 62 | var Animated = { 63 | MapViewEvent: MapViewEvent$1, 64 | UserLocationChangeEvent: UserLocationChangeEvent$1, 65 | PoiClickEvent: PoiClickEvent$1, 66 | MarkerDragEvent: MarkerDragEvent$1, 67 | MarkerDragStartEndEvent: MarkerDragStartEndEvent$1, 68 | KmlReadyEvent: KmlReadyEvent$1, 69 | IndoorLevelActivatedEvent: IndoorLevelActivatedEvent$1, 70 | IndoorBuildingFocusedEvent: IndoorBuildingFocusedEvent$1, 71 | make: make, 72 | }; 73 | 74 | exports.Make = Make; 75 | exports.MapViewEvent = MapViewEvent; 76 | exports.UserLocationChangeEvent = UserLocationChangeEvent; 77 | exports.PoiClickEvent = PoiClickEvent; 78 | exports.MarkerDragEvent = MarkerDragEvent; 79 | exports.MarkerDragStartEndEvent = MarkerDragStartEndEvent; 80 | exports.KmlReadyEvent = KmlReadyEvent; 81 | exports.IndoorLevelActivatedEvent = IndoorLevelActivatedEvent; 82 | exports.IndoorBuildingFocusedEvent = IndoorBuildingFocusedEvent; 83 | exports.Animated = Animated; 84 | /* MapViewEvent Not a pure module */ 85 | -------------------------------------------------------------------------------- /src/MapView.re: -------------------------------------------------------------------------------- 1 | include NativeElement; 2 | include Shared; 3 | 4 | type camera; 5 | [@bs.obj] 6 | external camera: 7 | ( 8 | ~center: LatLng.t, 9 | ~pitch: float, 10 | ~heading: float, 11 | ~altitude: float=?, 12 | ~zoom: int=?, 13 | unit 14 | ) => 15 | camera; 16 | 17 | type edgePadding; 18 | [@bs.obj] 19 | external edgePadding: 20 | (~top: float, ~right: float, ~bottom: float, ~left: float) => edgePadding; 21 | 22 | type mapBoundaries = { 23 | . 24 | "northEast": LatLng.t, 25 | "southWest": LatLng.t, 26 | }; 27 | [@bs.obj] 28 | external mapBoundaries: 29 | (~northEast: LatLng.t, ~southWest: LatLng.t) => mapBoundaries; 30 | 31 | type marker; 32 | [@bs.obj] 33 | external marker: 34 | (~id: string, ~coordinate: LatLng.t, ~title: string, ~description: string) => 35 | marker; 36 | 37 | type kmlContainer = {. "markers": array(marker)}; 38 | 39 | type indoorLevel = { 40 | . 41 | "activeLevelIndex": int, 42 | "name": string, 43 | "shortName": string, 44 | }; 45 | 46 | type indoorBuilding = { 47 | . 48 | "underground": bool, 49 | "activeLevelIndex": int, 50 | "levels": array(indoorLevel), 51 | }; 52 | 53 | type frame = { 54 | . 55 | "x": float, 56 | "y": float, 57 | "width": float, 58 | "height": float, 59 | }; 60 | 61 | type location = { 62 | . 63 | "latitude": float, 64 | "longitude": float, 65 | "altitude": float, 66 | "timestamp": float, 67 | "accuracy": float, 68 | "altitudeAccuracy": float, 69 | "speed": float, 70 | }; 71 | 72 | type duration; 73 | [@bs.obj] external duration: (~duration: float) => duration; 74 | 75 | type fitConfig; 76 | [@bs.obj] 77 | external fitConfig: (~edgePadding: edgePadding, ~animated: bool) => fitConfig; 78 | 79 | [@bs.send] external getCamera: (element, unit) => unit; 80 | [@bs.send] external animateCamera: (element, camera, duration) => unit; 81 | [@bs.send] external setCamera: (element, camera, duration) => unit; 82 | [@bs.send] external animateToRegion: (element, Region.t, float) => unit; 83 | [@bs.send] 84 | external getMapBoundaries: (element, unit) => Js.Promise.t(mapBoundaries); 85 | [@bs.send] external setMapBoundaries: (element, mapBoundaries) => unit; 86 | [@bs.send] external setIndoorActiveLevelIndex: (element, int) => unit; 87 | [@bs.send] external fitToElements: (element, bool) => unit; 88 | [@bs.send] 89 | external fitToSuppliedMarkers: (element, array(string), fitConfig) => unit; 90 | [@bs.send] 91 | external fitToCoordinates: (element, array(LatLng.t), fitConfig) => unit; 92 | [@bs.send] 93 | external pointForCoordinate: (element, LatLng.t) => Js.Promise.t(point); 94 | [@bs.send] 95 | external coordinateForPoint: (element, point) => Js.Promise.t(LatLng.t); 96 | [@bs.send] 97 | external getMarkersFrames: 98 | (element, bool) => 99 | Js.Promise.t({ 100 | . 101 | "markerID": { 102 | . 103 | "point": point, 104 | "frame": frame, 105 | }, 106 | }); 107 | 108 | module Make = (T: {type t;}) => { 109 | module MapViewEvent = 110 | ReactNative.Event.SyntheticEvent({ 111 | type _payload = copos; 112 | }); 113 | 114 | module UserLocationChangeEvent = 115 | ReactNative.Event.SyntheticEvent({ 116 | type _payload = {. coordinate: location}; 117 | }); 118 | 119 | module PoiClickEvent = 120 | ReactNative.Event.SyntheticEvent({ 121 | type _payload = poi; 122 | }); 123 | 124 | module MarkerDragEvent = 125 | ReactNative.Event.SyntheticEvent({ 126 | type _payload = { 127 | . 128 | coordinate: LatLng.t, 129 | position: point, 130 | }; 131 | }); 132 | 133 | module MarkerDragStartEndEvent = 134 | ReactNative.Event.SyntheticEvent({ 135 | type _payload = { 136 | . 137 | coordinate: LatLng.t, 138 | position: point, 139 | }; 140 | }); 141 | 142 | module KmlReadyEvent = 143 | ReactNative.Event.SyntheticEvent({ 144 | type _payload = kmlContainer; 145 | }); 146 | 147 | module IndoorLevelActivatedEvent = 148 | ReactNative.Event.SyntheticEvent({ 149 | type _payload = indoorLevel; 150 | }); 151 | 152 | module IndoorBuildingFocusedEvent = 153 | ReactNative.Event.SyntheticEvent({ 154 | type _payload = indoorBuilding; 155 | }); 156 | 157 | [@react.component] [@bs.module "react-native-maps/lib/components/MapView"] 158 | external make: 159 | ( 160 | ~ref: ref=?, 161 | ~provider: [@bs.string] [ | `google]=?, 162 | ~region: T.t=?, 163 | ~initialRegion: T.t=?, 164 | ~camera: camera=?, 165 | ~initialCamera: camera=?, 166 | ~mapPadding: edgePadding=?, 167 | ~paddingAdjustmentBehavior: [@bs.string] [ 168 | | `always 169 | | `automatic 170 | | `never 171 | ] 172 | =?, 173 | ~liteMode: bool=?, 174 | ~mapType: [@bs.string] [ 175 | | `standard 176 | | `satellite 177 | | `hybrid 178 | | `none 179 | | `terrain 180 | | `mutedStandard 181 | ] 182 | =?, 183 | ~customMapStyle: array(Js.Json.t)=?, 184 | ~showsUserLocation: bool=?, 185 | ~userLocationAnnotationTitle: string=?, 186 | ~userLocationFastestInterval: float=?, 187 | ~userLocationPriority: [@bs.string] [ 188 | | `balanced 189 | | `high 190 | | `low 191 | | `passive 192 | ] 193 | =?, 194 | ~userLocationUpdateInterval: float=?, 195 | ~followsUserLocation: bool=?, 196 | ~showsMyLocationButton: bool=?, 197 | ~showsPointsOfInterest: bool=?, 198 | ~showsCompass: bool=?, 199 | ~showsScale: bool=?, 200 | ~showsBuildings: bool=?, 201 | ~showsTraffic: bool=?, 202 | ~showsIndoors: bool=?, 203 | ~showsIndoorLevelPicker: bool=?, 204 | ~zoomEnabled: bool=?, 205 | ~zoomControlEnabled: bool=?, 206 | ~minZoomLevel: int=?, 207 | ~maxZoomLevel: int=?, 208 | ~rotateEnabled: bool=?, 209 | ~scrollEnabled: bool=?, 210 | ~pitchEnabled: bool=?, 211 | ~toolbarEnabled: bool=?, 212 | ~cacheEnabled: bool=?, 213 | ~loadingEnabled: bool=?, 214 | ~loadingIndicatorColor: ReactNative.Color.t=?, 215 | ~loadingBackgroundColor: ReactNative.Color.t=?, 216 | ~moveOnMarkerPress: bool=?, 217 | ~legalLabelInsets: ReactNative.View.edgeInsets=?, 218 | ~kmlSrc: string=?, 219 | ~compassOffset: point=?, 220 | ~isAccessibilityElement: bool=?, 221 | // Events 222 | ~onCalloutPress: unit => unit=?, 223 | ~onRegionChange: Region.t => unit=?, 224 | ~onRegionChangeComplete: Region.t => unit=?, 225 | ~onPress: MapViewEvent.t => unit=?, 226 | ~onDoublePress: MapViewEvent.t => unit=?, 227 | ~onLongPress: MapViewEvent.t => unit=?, 228 | ~onPanDrag: MapViewEvent.t => unit=?, 229 | ~onPoiClick: PoiClickEvent.t => unit=?, 230 | ~onMapReady: unit => unit=?, 231 | ~onMarkerPress: unit => unit=?, 232 | ~onMarkerDeselect: unit => unit=?, 233 | ~onMarkerSelect: unit => unit=?, 234 | ~onMarkerDrag: MarkerDragEvent.t => unit=?, 235 | ~onMarkerDragStart: MarkerDragStartEndEvent.t => unit=?, 236 | ~onMarkerDragEnd: MarkerDragStartEndEvent.t => unit=?, 237 | ~onKmlReady: KmlReadyEvent.t => unit=?, 238 | ~onIndoorLevelActivated: IndoorLevelActivatedEvent.t => unit=?, 239 | ~onIndoorBuildingFocused: IndoorBuildingFocusedEvent.t => unit=?, 240 | ~onUserLocationChange: UserLocationChangeEvent.t => unit=?, 241 | // View props 242 | ~accessibilityComponentType: [@bs.string] [ 243 | | `none 244 | | `button 245 | | `radiobutton_checked 246 | | `radiobutton_unchecked 247 | ] 248 | =?, 249 | ~accessibilityElementsHidden: bool=?, 250 | ~accessibilityHint: string=?, 251 | ~accessibilityIgnoresInvertColors: bool=?, 252 | ~accessibilityLabel: string=?, 253 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive] 254 | =?, 255 | ~accessibilityRole: [@bs.string] [ 256 | | `none 257 | | `button 258 | | `link 259 | | `search 260 | | `image 261 | | `keyboardkey 262 | | `text 263 | | `adjustable 264 | | `header 265 | | `summary 266 | | `imagebutton 267 | ] 268 | =?, 269 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 270 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 271 | ~accessibilityViewIsModal: bool=?, 272 | ~accessible: bool=?, 273 | ~collapsable: bool=?, 274 | ~hitSlop: ReactNative.View.edgeInsets=?, 275 | ~importantForAccessibility: [@bs.string] [ 276 | | `auto 277 | | `yes 278 | | `no 279 | | [@bs.as "no-hide-descendants"] 280 | `noHideDescendants 281 | ] 282 | =?, 283 | ~nativeID: string=?, 284 | ~needsOffscreenAlphaCompositing: bool=?, 285 | ~onAccessibilityEscape: unit => unit=?, 286 | ~onAccessibilityTap: unit => unit=?, 287 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 288 | ~onMagicTap: unit => unit=?, 289 | // Gesture Responder props 290 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 291 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 292 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 293 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 294 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 295 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 296 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 297 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 298 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 299 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 300 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 301 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 302 | ~pointerEvents: [@bs.string] [ 303 | | `auto 304 | | `none 305 | | [@bs.as "box-none"] `boxNone 306 | | [@bs.as "box-only"] `boxOnly 307 | ] 308 | =?, 309 | ~removeClippedSubviews: bool=?, 310 | ~renderToHardwareTextureAndroid: bool=?, 311 | ~shouldRasterizeIOS: bool=?, 312 | ~style: ReactNative.Style.t=?, 313 | ~testID: string=?, 314 | ~children: React.element=? 315 | ) => 316 | React.element = 317 | "default"; 318 | }; 319 | 320 | include Make({ 321 | type t = Region.t; 322 | }); 323 | 324 | module Animated = { 325 | include Make({ 326 | type t = Region.animated; 327 | }); 328 | 329 | let make = ReactNative.Animated.createAnimatedComponent(make); 330 | }; 331 | -------------------------------------------------------------------------------- /src/Marker.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var ReactNative = require("react-native"); 4 | var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js"); 5 | var MapMarker = require("react-native-maps/lib/components/MapMarker"); 6 | 7 | function Make(T) { 8 | var MarkerEvent = Event$ReactNative.SyntheticEvent({}); 9 | return { 10 | MarkerEvent: MarkerEvent, 11 | }; 12 | } 13 | 14 | var MarkerEvent = Event$ReactNative.SyntheticEvent({}); 15 | 16 | var MarkerEvent$1 = Event$ReactNative.SyntheticEvent({}); 17 | 18 | var make = ReactNative.Animated.createAnimatedComponent(MapMarker.default); 19 | 20 | var Animated = { 21 | MarkerEvent: MarkerEvent$1, 22 | make: make, 23 | }; 24 | 25 | exports.Make = Make; 26 | exports.MarkerEvent = MarkerEvent; 27 | exports.Animated = Animated; 28 | /* MarkerEvent Not a pure module */ 29 | -------------------------------------------------------------------------------- /src/Marker.re: -------------------------------------------------------------------------------- 1 | include NativeElement; 2 | include Shared; 3 | 4 | module Make = (T: {type t;}) => { 5 | module MarkerEvent = 6 | ReactNative.Event.SyntheticEvent({ 7 | type _payload = copos; 8 | }); 9 | 10 | [@react.component] [@bs.module "react-native-maps/lib/components/MapMarker"] 11 | external make: 12 | ( 13 | ~ref: ref=?, 14 | ~title: string=?, 15 | ~description: string=?, 16 | ~image: ReactNative.Image.Source.t=?, 17 | ~icon: ReactNative.Image.Source.t=?, 18 | ~pinColor: string=?, 19 | ~coordinate: T.t, 20 | ~centerOffset: point=?, 21 | ~calloutOffset: point=?, 22 | ~anchor: point=?, 23 | ~calloutAnchor: point=?, 24 | ~flat: bool=?, 25 | ~identifier: string=?, 26 | ~isPreselected: bool=?, 27 | ~rotation: float=?, 28 | ~draggable: bool=?, 29 | ~tracksViewChanges: bool=?, 30 | ~tracksInfoWindowChanges: bool=?, 31 | ~stopPropagation: bool=?, 32 | ~opacity: float=?, 33 | ~onPress: MarkerEvent.t => unit=?, 34 | ~onSelect: MarkerEvent.t => unit=?, 35 | ~onDeselect: MarkerEvent.t => unit=?, 36 | ~onCalloutPress: unit => unit=?, 37 | ~onDragStart: MarkerEvent.t => unit=?, 38 | ~onDrag: MarkerEvent.t => unit=?, 39 | ~onDragEnd: MarkerEvent.t => unit=?, 40 | // View props 41 | ~accessibilityComponentType: [@bs.string] [ 42 | | `none 43 | | `button 44 | | `radiobutton_checked 45 | | `radiobutton_unchecked 46 | ] 47 | =?, 48 | ~accessibilityElementsHidden: bool=?, 49 | ~accessibilityHint: string=?, 50 | ~accessibilityIgnoresInvertColors: bool=?, 51 | ~accessibilityLabel: string=?, 52 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive] 53 | =?, 54 | ~accessibilityRole: [@bs.string] [ 55 | | `none 56 | | `button 57 | | `link 58 | | `search 59 | | `image 60 | | `keyboardkey 61 | | `text 62 | | `adjustable 63 | | `header 64 | | `summary 65 | | `imagebutton 66 | ] 67 | =?, 68 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 69 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 70 | ~accessibilityViewIsModal: bool=?, 71 | ~accessible: bool=?, 72 | ~collapsable: bool=?, 73 | ~hitSlop: ReactNative.View.edgeInsets=?, 74 | ~importantForAccessibility: [@bs.string] [ 75 | | `auto 76 | | `yes 77 | | `no 78 | | [@bs.as "no-hide-descendants"] 79 | `noHideDescendants 80 | ] 81 | =?, 82 | ~nativeID: string=?, 83 | ~needsOffscreenAlphaCompositing: bool=?, 84 | ~onAccessibilityEscape: unit => unit=?, 85 | ~onAccessibilityTap: unit => unit=?, 86 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 87 | ~onMagicTap: unit => unit=?, 88 | // Gesture Responder props 89 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 90 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 91 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 92 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 93 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 94 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 95 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 96 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 97 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 98 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 99 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 100 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 101 | ~pointerEvents: [@bs.string] [ 102 | | `auto 103 | | `none 104 | | [@bs.as "box-none"] `boxNone 105 | | [@bs.as "box-only"] `boxOnly 106 | ] 107 | =?, 108 | ~removeClippedSubviews: bool=?, 109 | ~renderToHardwareTextureAndroid: bool=?, 110 | ~shouldRasterizeIOS: bool=?, 111 | ~style: ReactNative.Style.t=?, 112 | ~testID: string=?, 113 | ~children: React.element=? 114 | ) => 115 | React.element = 116 | "default"; 117 | }; 118 | 119 | [@bs.send] external showCallout: (element, unit) => unit; 120 | [@bs.send] external hideCallout: (element, unit) => unit; 121 | [@bs.send] external redrawCallout: (element, unit) => unit; 122 | [@bs.send] 123 | external animateMarkerToCoordinate: (element, LatLng.t, float) => unit; 124 | [@bs.send] external redraw: (element, unit) => unit; 125 | 126 | include Make({ 127 | type t = LatLng.t; 128 | }); 129 | 130 | module Animated = { 131 | include Make({ 132 | type t = LatLng.animated; 133 | }); 134 | 135 | let make = ReactNative.Animated.createAnimatedComponent(make); 136 | }; 137 | -------------------------------------------------------------------------------- /src/NativeElement.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/NativeElement.re: -------------------------------------------------------------------------------- 1 | type element; 2 | 3 | type ref = React.ref(Js.nullable(element)); 4 | 5 | [@bs.module "react-native"] 6 | external findNodeHandle: element => ReactNative.NativeTypes.nodeHandle = 7 | "findNodeHandle"; 8 | -------------------------------------------------------------------------------- /src/Overlay.bs.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var ReactNative = require("react-native"); 4 | var Event$ReactNative = require("reason-react-native/src/apis/Event.bs.js"); 5 | var MapOverlay = require("react-native-maps/lib/components/MapOverlay"); 6 | 7 | var OnPressEvent = Event$ReactNative.SyntheticEvent({}); 8 | 9 | var Make = { 10 | OnPressEvent: OnPressEvent, 11 | }; 12 | 13 | var make = ReactNative.Animated.createAnimatedComponent(MapOverlay.default); 14 | 15 | var Animated = { 16 | OnPressEvent: OnPressEvent, 17 | make: make, 18 | }; 19 | 20 | var defaultAction = "overlay-press"; 21 | 22 | exports.defaultAction = defaultAction; 23 | exports.Make = Make; 24 | exports.OnPressEvent = OnPressEvent; 25 | exports.Animated = Animated; 26 | /* OnPressEvent Not a pure module */ 27 | -------------------------------------------------------------------------------- /src/Overlay.re: -------------------------------------------------------------------------------- 1 | type point = Shared.point; 2 | 3 | let defaultAction = "overlay-press"; 4 | 5 | module Make = { 6 | module OnPressEvent = 7 | ReactNative.Event.SyntheticEvent({ 8 | type _payload = { 9 | . 10 | "action": string, 11 | "coordinate": LatLng.t, 12 | "position": point, 13 | }; 14 | }); 15 | 16 | [@react.component] [@bs.module "react-native-maps/lib/components/MapOverlay"] 17 | external make: 18 | ( 19 | ~image: ReactNative.Image.Source.t, 20 | ~bounds: (LatLng.t, LatLng.t)=?, 21 | ~onPress: OnPressEvent.t => unit=?, 22 | ~opacity: float=?, 23 | ~tappable: bool=?, 24 | // View props 25 | ~accessibilityComponentType: [@bs.string] [ 26 | | `none 27 | | `button 28 | | `radiobutton_checked 29 | | `radiobutton_unchecked 30 | ] 31 | =?, 32 | ~accessibilityElementsHidden: bool=?, 33 | ~accessibilityHint: string=?, 34 | ~accessibilityIgnoresInvertColors: bool=?, 35 | ~accessibilityLabel: string=?, 36 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive] 37 | =?, 38 | ~accessibilityRole: [@bs.string] [ 39 | | `none 40 | | `button 41 | | `link 42 | | `search 43 | | `image 44 | | `keyboardkey 45 | | `text 46 | | `adjustable 47 | | `header 48 | | `summary 49 | | `imagebutton 50 | ] 51 | =?, 52 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 53 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 54 | ~accessibilityViewIsModal: bool=?, 55 | ~accessible: bool=?, 56 | ~collapsable: bool=?, 57 | ~hitSlop: ReactNative.View.edgeInsets=?, 58 | ~importantForAccessibility: [@bs.string] [ 59 | | `auto 60 | | `yes 61 | | `no 62 | | [@bs.as "no-hide-descendants"] 63 | `noHideDescendants 64 | ] 65 | =?, 66 | ~nativeID: string=?, 67 | ~needsOffscreenAlphaCompositing: bool=?, 68 | ~onAccessibilityEscape: unit => unit=?, 69 | ~onAccessibilityTap: unit => unit=?, 70 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 71 | ~onMagicTap: unit => unit=?, 72 | // Gesture Responder props 73 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 74 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 75 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 76 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 77 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 78 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 79 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 80 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 81 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 82 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 83 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 84 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 85 | ~pointerEvents: [@bs.string] [ 86 | | `auto 87 | | `none 88 | | [@bs.as "box-none"] `boxNone 89 | | [@bs.as "box-only"] `boxOnly 90 | ] 91 | =?, 92 | ~removeClippedSubviews: bool=?, 93 | ~renderToHardwareTextureAndroid: bool=?, 94 | ~shouldRasterizeIOS: bool=?, 95 | ~style: ReactNative.Style.t=?, 96 | ~testID: string=?, 97 | ~children: React.element=? 98 | ) => 99 | React.element = 100 | "default"; 101 | }; 102 | 103 | include Make; 104 | 105 | module Animated = { 106 | include Make; 107 | 108 | let make = ReactNative.Animated.createAnimatedComponent(make); 109 | }; 110 | -------------------------------------------------------------------------------- /src/Polygon.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Polygon.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapPolygon"] 2 | external make: 3 | ( 4 | ~coordinates: array(LatLng.t), 5 | ~holes: array(array(LatLng.t))=?, 6 | ~strokeWidth: float=?, 7 | ~strokeColor: ReactNative.Color.t=?, 8 | ~fillColor: ReactNative.Color.t=?, 9 | ~lineCap: [@bs.string] [ | `butt | `round | `square]=?, 10 | ~lineJoin: [@bs.string] [ | `bevel | `miter | `round]=?, 11 | ~miterLimit: int=?, 12 | ~geodesic: bool=?, 13 | ~lineDashPhase: int=?, 14 | ~lineDashPattern: array(int)=?, 15 | ~tappable: bool=?, 16 | ~onPress: unit => unit=?, 17 | // View props 18 | ~accessibilityComponentType: [@bs.string] [ 19 | | `none 20 | | `button 21 | | `radiobutton_checked 22 | | `radiobutton_unchecked 23 | ] 24 | =?, 25 | ~accessibilityElementsHidden: bool=?, 26 | ~accessibilityHint: string=?, 27 | ~accessibilityIgnoresInvertColors: bool=?, 28 | ~accessibilityLabel: string=?, 29 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 30 | ~accessibilityRole: [@bs.string] [ 31 | | `none 32 | | `button 33 | | `link 34 | | `search 35 | | `image 36 | | `keyboardkey 37 | | `text 38 | | `adjustable 39 | | `header 40 | | `summary 41 | | `imagebutton 42 | ] 43 | =?, 44 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 45 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 46 | ~accessibilityViewIsModal: bool=?, 47 | ~accessible: bool=?, 48 | ~collapsable: bool=?, 49 | ~hitSlop: ReactNative.View.edgeInsets=?, 50 | ~importantForAccessibility: [@bs.string] [ 51 | | `auto 52 | | `yes 53 | | `no 54 | | [@bs.as "no-hide-descendants"] 55 | `noHideDescendants 56 | ] 57 | =?, 58 | ~nativeID: string=?, 59 | ~needsOffscreenAlphaCompositing: bool=?, 60 | ~onAccessibilityEscape: unit => unit=?, 61 | ~onAccessibilityTap: unit => unit=?, 62 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 63 | ~onMagicTap: unit => unit=?, 64 | // Gesture Responder props 65 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 66 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 67 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 68 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 69 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 70 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 71 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 74 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 75 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 76 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 77 | ~pointerEvents: [@bs.string] [ 78 | | `auto 79 | | `none 80 | | [@bs.as "box-none"] `boxNone 81 | | [@bs.as "box-only"] `boxOnly 82 | ] 83 | =?, 84 | ~removeClippedSubviews: bool=?, 85 | ~renderToHardwareTextureAndroid: bool=?, 86 | ~shouldRasterizeIOS: bool=?, 87 | ~style: ReactNative.Style.t=?, 88 | ~testID: string=?, 89 | ~children: React.element=? 90 | ) => 91 | React.element = 92 | "default"; 93 | -------------------------------------------------------------------------------- /src/Polyline.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Polyline.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapPolyline"] 2 | external make: 3 | ( 4 | ~coordinates: array(LatLng.t), 5 | ~strokeWidth: float=?, 6 | ~strokeColor: ReactNative.Color.t=?, 7 | ~strokeColors: array(ReactNative.Color.t)=?, 8 | ~lineCap: [@bs.string] [ | `butt | `round | `square]=?, 9 | ~lineJoin: [@bs.string] [ | `bevel | `miter | `round]=?, 10 | ~miterLimit: int=?, 11 | ~geodesic: bool=?, 12 | ~lineDashPhase: int=?, 13 | ~lineDashPattern: array(int)=?, 14 | ~tappable: bool=?, 15 | ~onPress: unit => unit=?, 16 | // View props 17 | ~accessibilityComponentType: [@bs.string] [ 18 | | `none 19 | | `button 20 | | `radiobutton_checked 21 | | `radiobutton_unchecked 22 | ] 23 | =?, 24 | ~accessibilityElementsHidden: bool=?, 25 | ~accessibilityHint: string=?, 26 | ~accessibilityIgnoresInvertColors: bool=?, 27 | ~accessibilityLabel: string=?, 28 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 29 | ~accessibilityRole: [@bs.string] [ 30 | | `none 31 | | `button 32 | | `link 33 | | `search 34 | | `image 35 | | `keyboardkey 36 | | `text 37 | | `adjustable 38 | | `header 39 | | `summary 40 | | `imagebutton 41 | ] 42 | =?, 43 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 44 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 45 | ~accessibilityViewIsModal: bool=?, 46 | ~accessible: bool=?, 47 | ~collapsable: bool=?, 48 | ~hitSlop: ReactNative.View.edgeInsets=?, 49 | ~importantForAccessibility: [@bs.string] [ 50 | | `auto 51 | | `yes 52 | | `no 53 | | [@bs.as "no-hide-descendants"] 54 | `noHideDescendants 55 | ] 56 | =?, 57 | ~nativeID: string=?, 58 | ~needsOffscreenAlphaCompositing: bool=?, 59 | ~onAccessibilityEscape: unit => unit=?, 60 | ~onAccessibilityTap: unit => unit=?, 61 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 62 | ~onMagicTap: unit => unit=?, 63 | // Gesture Responder props 64 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 65 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 66 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 67 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 68 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 69 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 70 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 71 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 72 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 73 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 74 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 75 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 76 | ~pointerEvents: [@bs.string] [ 77 | | `auto 78 | | `none 79 | | [@bs.as "box-none"] `boxNone 80 | | [@bs.as "box-only"] `boxOnly 81 | ] 82 | =?, 83 | ~removeClippedSubviews: bool=?, 84 | ~renderToHardwareTextureAndroid: bool=?, 85 | ~shouldRasterizeIOS: bool=?, 86 | ~style: ReactNative.Style.t=?, 87 | ~testID: string=?, 88 | ~children: React.element=? 89 | ) => 90 | React.element = 91 | "default"; 92 | -------------------------------------------------------------------------------- /src/Region.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Region.re: -------------------------------------------------------------------------------- 1 | type t = { 2 | . 3 | "latitude": float, 4 | "longitude": float, 5 | "latitudeDelta": float, 6 | "longitudeDelta": float, 7 | }; 8 | 9 | [@bs.obj] 10 | external create: 11 | ( 12 | ~latitude: float, 13 | ~longitude: float, 14 | ~latitudeDelta: float, 15 | ~longitudeDelta: float 16 | ) => 17 | t = 18 | ""; 19 | 20 | type animated; 21 | 22 | [@bs.new] [@bs.module "react-native-maps/lib/components/AnimatedRegion"] 23 | external createAnimated: t => animated = "default"; 24 | -------------------------------------------------------------------------------- /src/Shared.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/Shared.re: -------------------------------------------------------------------------------- 1 | type point = { 2 | . 3 | "y": float, 4 | "x": float, 5 | }; 6 | 7 | [@bs.obj] external point: (~x: float, ~y: float) => point = ""; 8 | 9 | type copos = { 10 | . 11 | "coordinate": LatLng.t, 12 | "position": point, 13 | }; 14 | 15 | type poi = { 16 | . 17 | "coordinate": LatLng.t, 18 | "position": point, 19 | "placeId": string, 20 | "name": string, 21 | }; 22 | -------------------------------------------------------------------------------- /src/UrlTile.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/UrlTile.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapUrlTile"] 2 | external make: 3 | ( 4 | ~urlTemplate: string, 5 | ~zIndex: int=?, 6 | ~maximumZ: float=?, 7 | ~minimumZ: float=?, 8 | ~shouldReplaceMapContent: bool=?, 9 | ~tileSize: int=?, 10 | ~flipY: bool=?, 11 | // View props 12 | ~accessibilityComponentType: [@bs.string] [ 13 | | `none 14 | | `button 15 | | `radiobutton_checked 16 | | `radiobutton_unchecked 17 | ] 18 | =?, 19 | ~accessibilityElementsHidden: bool=?, 20 | ~accessibilityHint: string=?, 21 | ~accessibilityIgnoresInvertColors: bool=?, 22 | ~accessibilityLabel: string=?, 23 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 24 | ~accessibilityRole: [@bs.string] [ 25 | | `none 26 | | `button 27 | | `link 28 | | `search 29 | | `image 30 | | `keyboardkey 31 | | `text 32 | | `adjustable 33 | | `header 34 | | `summary 35 | | `imagebutton 36 | ] 37 | =?, 38 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 39 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 40 | ~accessibilityViewIsModal: bool=?, 41 | ~accessible: bool=?, 42 | ~collapsable: bool=?, 43 | ~hitSlop: ReactNative.View.edgeInsets=?, 44 | ~importantForAccessibility: [@bs.string] [ 45 | | `auto 46 | | `yes 47 | | `no 48 | | [@bs.as "no-hide-descendants"] 49 | `noHideDescendants 50 | ] 51 | =?, 52 | ~nativeID: string=?, 53 | ~needsOffscreenAlphaCompositing: bool=?, 54 | ~onAccessibilityEscape: unit => unit=?, 55 | ~onAccessibilityTap: unit => unit=?, 56 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 57 | ~onMagicTap: unit => unit=?, 58 | // Gesture Responder props 59 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 60 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 61 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 62 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 63 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 64 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 65 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 66 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 67 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 68 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 69 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 70 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 71 | ~pointerEvents: [@bs.string] [ 72 | | `auto 73 | | `none 74 | | [@bs.as "box-none"] `boxNone 75 | | [@bs.as "box-only"] `boxOnly 76 | ] 77 | =?, 78 | ~removeClippedSubviews: bool=?, 79 | ~renderToHardwareTextureAndroid: bool=?, 80 | ~shouldRasterizeIOS: bool=?, 81 | ~style: ReactNative.Style.t=?, 82 | ~testID: string=?, 83 | ~children: React.element=? 84 | ) => 85 | React.element = 86 | "default"; 87 | -------------------------------------------------------------------------------- /src/WMSTile.bs.js: -------------------------------------------------------------------------------- 1 | /* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */ 2 | -------------------------------------------------------------------------------- /src/WMSTile.re: -------------------------------------------------------------------------------- 1 | [@react.component] [@bs.module "react-native-maps/lib/components/MapWMSTile"] 2 | external make: 3 | ( 4 | ~urlTemplate: string, 5 | ~zIndex: int=?, 6 | ~maximumZ: float=?, 7 | ~minimumZ: float=?, 8 | ~shouldReplaceMapContent: bool=?, 9 | ~tileSize: int=?, 10 | ~opacity: float=?, 11 | // View props 12 | ~accessibilityComponentType: [@bs.string] [ 13 | | `none 14 | | `button 15 | | `radiobutton_checked 16 | | `radiobutton_unchecked 17 | ] 18 | =?, 19 | ~accessibilityElementsHidden: bool=?, 20 | ~accessibilityHint: string=?, 21 | ~accessibilityIgnoresInvertColors: bool=?, 22 | ~accessibilityLabel: string=?, 23 | ~accessibilityLiveRegion: [@bs.string] [ | `none | `polite | `assertive]=?, 24 | ~accessibilityRole: [@bs.string] [ 25 | | `none 26 | | `button 27 | | `link 28 | | `search 29 | | `image 30 | | `keyboardkey 31 | | `text 32 | | `adjustable 33 | | `header 34 | | `summary 35 | | `imagebutton 36 | ] 37 | =?, 38 | ~accessibilityStates: array(ReactNative.Accessibility.state)=?, 39 | ~accessibilityTraits: array(ReactNative.AccessibilityTrait.t)=?, 40 | ~accessibilityViewIsModal: bool=?, 41 | ~accessible: bool=?, 42 | ~collapsable: bool=?, 43 | ~hitSlop: ReactNative.View.edgeInsets=?, 44 | ~importantForAccessibility: [@bs.string] [ 45 | | `auto 46 | | `yes 47 | | `no 48 | | [@bs.as "no-hide-descendants"] 49 | `noHideDescendants 50 | ] 51 | =?, 52 | ~nativeID: string=?, 53 | ~needsOffscreenAlphaCompositing: bool=?, 54 | ~onAccessibilityEscape: unit => unit=?, 55 | ~onAccessibilityTap: unit => unit=?, 56 | ~onLayout: ReactNative.Event.layoutEvent => unit=?, 57 | ~onMagicTap: unit => unit=?, 58 | // Gesture Responder props 59 | ~onMoveShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 60 | ~onMoveShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 61 | ~onResponderEnd: ReactNative.Event.pressEvent => unit=?, 62 | ~onResponderGrant: ReactNative.Event.pressEvent => unit=?, 63 | ~onResponderMove: ReactNative.Event.pressEvent => unit=?, 64 | ~onResponderReject: ReactNative.Event.pressEvent => unit=?, 65 | ~onResponderRelease: ReactNative.Event.pressEvent => unit=?, 66 | ~onResponderStart: ReactNative.Event.pressEvent => unit=?, 67 | ~onResponderTerminate: ReactNative.Event.pressEvent => unit=?, 68 | ~onResponderTerminationRequest: ReactNative.Event.pressEvent => bool=?, 69 | ~onStartShouldSetResponder: ReactNative.Event.pressEvent => bool=?, 70 | ~onStartShouldSetResponderCapture: ReactNative.Event.pressEvent => bool=?, 71 | ~pointerEvents: [@bs.string] [ 72 | | `auto 73 | | `none 74 | | [@bs.as "box-none"] `boxNone 75 | | [@bs.as "box-only"] `boxOnly 76 | ] 77 | =?, 78 | ~removeClippedSubviews: bool=?, 79 | ~renderToHardwareTextureAndroid: bool=?, 80 | ~shouldRasterizeIOS: bool=?, 81 | ~style: ReactNative.Style.t=?, 82 | ~testID: string=?, 83 | ~children: React.element=? 84 | ) => 85 | React.element = 86 | "default"; 87 | --------------------------------------------------------------------------------