Skip to content

Commit

Permalink
version 0.26.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sgny committed Nov 3, 2019
1 parent 58e7686 commit fed7bb9
Show file tree
Hide file tree
Showing 17 changed files with 310 additions and 117 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog of `reason-react-native-maps`

## 0.26.0 - 2019-11-1

Note that there are breaking changes in this release:

- `react-native-maps` is now a peer dependency to make it more straightforward
to use other versions of said package.
- added constructors for some types passed as arguments to `MapView` methods
- scripts are brought in line with those for `@reason-react-native/*` packages.

Other changes:

- documentation added for components and types

## 0.24.1 - 2019-06-24

`View` props added to components

## 0.24.0 - 2019-06-17

Initial release.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 sgny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
56 changes: 53 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,77 @@
# BuckleScript bindings to React Native Maps

_This branch does not support `GeoJSON`. Please use the `geojson` branch and the
`reason-react-native-maps-geojson` package if you need support for that format._

[![Version](https://img.shields.io/npm/v/reason-react-native-maps.svg)](https://www.npmjs.com/package/reason-react-native-maps)

These are complete BuckleScript bindings to [`React Native Maps`](https://github.com/react-native-community/react-native-maps), in Reason syntax.
These are complete BuckleScript bindings to
[`React Native Maps`](https://github.com/react-native-community/react-native-maps),
in Reason syntax.

Version `x.y.z` of `reason-react-native-maps` should be compatible with version
`x.y.*` of `react-native-maps`.

## Changes

Please see the [changelog](./CHANGELOG.md).

## Installation

With `yarn`:

```shell
yarn add reason-react-native-maps
```

With `npm`:

```shell
npm install reason-react-native-maps
```

`react-native-maps` should be properly installed if you are using React Native
versions below 0.60 linked. Please refer to the relevant
[instructions](https://github.com/react-native-community/react-native-maps/blob/master/docs/installation.md).

Finally, `reason-react-native-maps` should be added to `bs-dependencies` in
`BuckleScript` configuration of the project (`bsconfig.json`). For example,

Version of these bindings follow that of the `React Native Maps` package.
```json
{
...
"bs-dependencies": ["reason-react", "reason-react-native", "reason-react-native-maps"],
...
}
```

## Modules

### [MapView](docs/MapView.md)

### [Marker](docs/Marker.md)

### [Heatmap](docs/Heatmap.md)

### [Circle](docs/Circle.md)

### [Overlay](docs/Overlay.md)

### [Polygon](docs/Polygon.md)

### [Polyline](docs/Polyline.md)

### [Callout](docs/Callout.md)

### [CalloutSubview](docs/CalloutSubview.md)

## Types

### [LatLng](docs/LatLng.md)

### [Region](docs/Region.md)

### [Shared](docs/Shared.md)

Further documentation will be added later. Documentation has been adapted from that for `React Native Maps`.
Further documentation will be added later. Documentation has been adapted from
that for `React Native Maps`.
2 changes: 1 addition & 1 deletion bsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"subdirs": false
}
],
"bsc-flags": ["-bs-no-version-header", "-warn-error @a"],
"bsc-flags": ["-bs-no-version-header", "-warn-error @a", "-w @a-105"],
"bs-dependencies": ["reason-react", "reason-react-native"]
}
6 changes: 5 additions & 1 deletion docs/Callout.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

## Events

Callback that is called when the user presses on the callout. The `onPress` event returns `ReactNative.Event.syntheticEvent({. action: action})`. Accordingly, to handle the event you need to pass a function of type `ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to use the `##` accessor for each individual key within the function specified.
Callback that is called when the user presses on the callout. The `onPress`
event returns `ReactNative.Event.syntheticEvent({. action: action})`.
Accordingly, to handle the event you need to pass a function of type
`ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to
use the `##` accessor for each individual key within the function specified.

## Types

Expand Down
12 changes: 8 additions & 4 deletions docs/CalloutSubview.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# `CalloutSubview` Component API

**Note**: Supported on iOS only.
Use to handle press on specific subview of callout.
This component should be a child of a `Callout` component.
**Note**: Supported on iOS only. Use to handle press on specific subview of
callout. This component should be a child of a `Callout` component.

## Events

### `onPress`

Callback that is called when the user presses on this subview inside callout. The `onPress` event returns `ReactNative.Event.syntheticEvent({. action: action})`. Accordingly, to handle the event you need to pass a function of type `ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to use the `##` accessor for each individual key within the function specified.
Callback that is called when the user presses on this subview inside callout.
The `onPress` event returns
`ReactNative.Event.syntheticEvent({. action: action})`. Accordingly, to handle
the event you need to pass a function of type
`ReactNative.Event.syntheticEvent({. action: action}) => unit`. You will need to
use the `##` accessor for each individual key within the function specified.

## Types

Expand Down
4 changes: 3 additions & 1 deletion docs/Heatmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

### `gradient`

[Android Doc](https://developers.google.com/maps/documentation/android-sdk/utility/heatmap#custom) | [iOS Doc](https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap#customize)
[Android Doc](https://developers.google.com/maps/documentation/android-sdk/utility/heatmap#custom)
|
[iOS Doc](https://developers.google.com/maps/documentation/ios-sdk/utility/heatmap#customize)

| Prop | Type | Default | Note |
| -------------- | ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down
3 changes: 2 additions & 1 deletion docs/LatLng.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

### `t`

This type needs to be created, as well as consumed. When the type is returned, individual keys may be accessed using the `##` accessor.
This type needs to be created, as well as consumed. When the type is returned,
individual keys may be accessed using the `##` accessor.

```reason
type t = {
Expand Down
Loading

0 comments on commit fed7bb9

Please sign in to comment.