-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Android: Fix lineCap of Polyline #2375
Conversation
Hi, thanks for the PR ❤️ Does it work correctly on ios? (both ios and google maps) |
Hi @rborn, on iOS, the MapKit version works correctly. |
@rborn I send you the screenshots of iOS and Android |
@kruyvanna that's great, one more thing: could you please amend the docs that it's not supported yet? https://github.com/react-community/react-native-maps/blob/master/docs/polyline.md |
@rborn done. Not sure about my English wording. |
@@ -22,6 +24,7 @@ | |||
private float width; | |||
private boolean geodesic; | |||
private float zIndex; | |||
private Cap lineCap = new RoundCap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need here a RoundCap ?
docs/polyline.md
Outdated
@@ -9,7 +9,7 @@ | |||
| `strokeColor` | `String` | `#000` | The stroke color to use for the path. | |||
| `strokeColors` | `Array<String>` | `null` | The stroke colors to use for the path (iOS only). Must be the same length as `coordinates`. | |||
| `lineCap` | `String` | `round` | The line cap style to apply to the open ends of the path. Possible values are `butt`, `round` or `square`. | |||
| `lineJoin` | `String` | `round` | The line join style to apply to corners of the path. Possible values are `miter`, `round` or `bevel`. | |||
| `lineJoin` | `String` | `round` | The line join style to apply to corners of the path. Possible values are `miter`, `round` or `bevel`. Note: lineJoin is not yet supported for GoogleMaps provider on iOS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's lineJoin
not available or lineCap
(english is great 🤗)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops!, it's lineCap. :D
cap = new SquareCap(); | ||
break; | ||
default: | ||
cap = new RoundCap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a default cap ? I mean maybe people don't want one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the docs says round is the default one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok great, I'm blind 😹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D
@rborn I corrected the docs changing from lineJoin to lineCap |
All good, thanks a lot ❤️ @alvelig LGTM 🐽 |
@rborn Btw, I added support for lineDashPattern on Android. |
@kruyvanna new PR please |
@rborn ok |
* master: (168 commits) Adding overlaying components details (react-native-maps#2425) docs: pin color limitations for android (react-native-maps#2429) Revert "Added MBTiles support for iOS and Android (react-native-maps#2208)" (react-native-maps#2387) Added MBTiles support for iOS and Android (react-native-maps#2208) Fix disabling the toolbar and my location button (react-native-maps#2317) Fixes warnings about self (react-native-maps#2341) Android: Fix lineCap of Polyline (react-native-maps#2375) Update installation.md (react-native-maps#2381) update doc (react-native-maps#2363) zIndex doesn't work when the map moves in iOS 11 (react-native-maps#2359) Fix readme formatting (react-native-maps#2358) add support for calloutAnchor with GoogleMaps on iOS; fixes react-native-maps#1852 (react-native-maps#2351) Added animateToNavigation method to MapView (react-native-maps#2049) Add react-native@^0.55 to peerDependencies (react-native-maps#2332) Fix custom marker updates on android react-native-maps#1611 react-native-maps#2048 [iOS] Prefix or eliminate globals in AIRMapMarker (react-native-maps#2306) Fix CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF warnings (react-native-maps#2154) Fix for compile error (react-native-maps#2215). (react-native-maps#2232) Make tiles display at the same physical size regardless of pixel dens… (react-native-maps#2248) Added support of lineDashPattern polyline prop to iOS Google Maps (react-native-maps#2243) ... # Conflicts: # lib/components/MapMarker.js
Does any other open PR do the same thing?
No
What issue is this PR fixing?
#2374
How did you test this PR?
Verified on Android, HTC M8