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. |
| private float width; | ||
| private boolean geodesic; | ||
| private float zIndex; | ||
| private Cap lineCap = new RoundCap(); |
There was a problem hiding this comment.
Why do we need here a RoundCap ?
docs/polyline.md
Outdated
| | `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.
It's lineJoin not available or lineCap (english is great 🤗)
There was a problem hiding this comment.
oops!, it's lineCap. :D
| cap = new SquareCap(); | ||
| break; | ||
| default: | ||
| cap = new RoundCap(); |
There was a problem hiding this comment.
Do we need a default cap ? I mean maybe people don't want one.
There was a problem hiding this comment.
the docs says round is the default one
|
@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
* Android: Fix lineCap of Polyline * update Polyline docs on lineCap property * Fix docs: update Polyline docs on lineCap property

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