Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New methods to convert between LatLng and Point #1851

Merged

Conversation

danielgindi
Copy link
Contributor

Right here, right now, explaining this is a "more is less" situation :-)

@danielgindi danielgindi force-pushed the feature/pt_latlng_conversions branch from ee835a9 to da2723a Compare December 31, 2017 18:18
@danielgindi
Copy link
Contributor Author

@rborn can we get this moving also? This is very useful and simply exposes basic functionality

docs/mapview.md Outdated
@@ -71,6 +71,8 @@ To access event data, you will need to use `e.nativeEvent`. For example, `onPres
| `fitToElements` | `animated: Boolean` |
| `fitToSuppliedMarkers` | `markerIDs: String[]`, `animated: Boolean` | If you need to use this in `ComponentDidMount`, make sure you put it in a timeout or it will cause performance problems.
| `fitToCoordinates` | `coordinates: Array<LatLng>, options: { edgePadding: EdgePadding, animated: Boolean }` | If called in `ComponentDidMount` in android, it will cause an exception. It is recommended to call it from the MapView `onLayout` event.
| `pointForCoordinate` | `coordinate: LatLng` | Converts a map coordinate to a user-space point. Returns a `Promise<Point>`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain a little more what user-space is? (I suppose we talk view coordinates, right?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it means view-coordinates...

@rborn
Copy link
Collaborator

rborn commented Jan 10, 2018

@danielgindi thank you 🤗

@rborn rborn merged commit 9cb22b9 into react-native-maps:master Jan 10, 2018
pedrolopes10 pushed a commit to pedrolopes10/react-native-maps that referenced this pull request Jan 10, 2018
* New methods to convert between LatLng and Point

* Clarification for `pointForCoordinate` and `coordinateForPoint`
pedrolopes10 pushed a commit to pedrolopes10/react-native-maps that referenced this pull request Jan 10, 2018
* New methods to convert between LatLng and Point

* Clarification for `pointForCoordinate` and `coordinateForPoint`
pedrolopes10 added a commit to pedrolopes10/react-native-maps that referenced this pull request Jan 10, 2018
@danielgindi danielgindi deleted the feature/pt_latlng_conversions branch April 1, 2018 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants