bramus / bramus/react-native-maps-directions
Fix for timePrecison
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 210
- PR merge metrics
- No merged PRs in 30d
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch `react-native-maps-directions@1.8.0` for the project I'm working on.
Here is the diff that solved my problem:
```diff
diff --git a/node_modules/react-native-maps-directions/index.d.ts b/node_modules/react-native-maps-directions/index.d.ts
index 8d0a9ec..58c1a7d 100644
--- a/node_modules/react-native-maps-directions/index.d.ts
+++ b/node_modules/react-native-maps-directions/index.d.ts
@@ -88,7 +88,7 @@ declare module "react-native-maps-directions" {
* Allowed values are "none", and "now".
* Defaults to "none"
*/
- timePrecision?: MapViewDirectionsPrecision;
+ timePrecision?: MapViewDirectionsTimePrecision;
/**
* If you include the channel parameter in your requests,
* you can generate a Successful Requests report that shows a breakdown
diff --git a/node_modules/react-native-maps-directions/src/MapViewDirections.js b/node_modules/react-native-maps-directions/src/MapViewDirections.js
index ac08d73..1ed30a2 100644
--- a/node_modules/react-native-maps-directions/src/MapViewDirections.js
+++ b/node_modules/react-native-maps-directions/src/MapViewDirections.js
@@ -1,6 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import MapView from 'react-native-maps';
+import { Polyline } from 'react-native-maps';
+
import isEqual from 'lodash.isequal';
const WAYPOINT_LIMIT = 10;
@@ -305,7 +307,7 @@ class MapViewDirections extends Component {
} = this.props;
return (
-
+
);
}
```
This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).
Contributor guide
No contributing guide indexed for this repository
Research direction
Review index.d.ts and src/MapViewDirections.js, starting with the supplied diff and the existing timePrecision declaration and Polyline rendering. Confirm that the prop uses the correct type name and that the directions component renders through the imported Polyline, then verify the package still builds and behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100