#3025 Fixes for polygon custom styles (fillColor, stokeColor, stokeWidth) not being applied on iOS devices when provider is Google maps.#3309
Merged
rborn merged 5 commits intoreact-native-maps:masterfrom Mar 4, 2020
Conversation
…layout completes calculation.
…okeColor-not-being-applied-on-iOS-issue Applied fillColor and stokeColor and stokeWidth to polygons once the layout completes calculation.
…e map provider is goole.
…oogle-maps Only update native styles when map provider is google.
Collaborator
|
@BeckyWu220 thank you so much for this PR ❤ |
Author
|
@rborn Hi! This issue was only found on Google maps. Apple maps doesn't have the same issue detected. Thanks! |
Collaborator
|
@BeckyWu220 so it works fine in Apple maps without this PR ? |
Author
|
@rborn Yes. Apple map works fine without this PR. |
Collaborator
|
@BeckyWu220 great, thank you 😻 |
Author
|
@rborn You are welcome! Great work in maintaining the great library. Thanks! |
|
Hello, I updated the library but I still have this bug :( |
|
Something I forgot to mention: I'm using Polygon, not Geojson. |
pinpong
pushed a commit
to pinpong/react-native-maps
that referenced
this pull request
Feb 28, 2025
…okeColor, stokeWidth) not being applied on iOS devices when provider is Google maps. (react-native-maps#3309) * Applied fillColor and stokeColor and stokeWidth to polygons once the layout completes calculation. * Refactor with separate function and only update native styles when the map provider is goole. * Fixed formatting issued found by ESLint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Taking #3025 (comment) as a reference. Apply
fillColor,stokeColorandstokeWidthto polygons after the layout is calculated.Does any other open PR do the same thing?
A few related issues (#3025 (comment), #2867 (comment) ) were brought up and some comments indicated some temporary fix. However, no PR was found.
What issue is this PR fixing?
This issue was found while testing GeoJSON. In
Geojsoncomponent, I passed in multiple style related props,fillColor,strokeColor, andstrokeWidth. However, in iOS simulator, I could only see the default style (purple with opacity) being applied when using Google maps.As the screenshot below.

Related issues found in repo.
#3025 (comment), #2867 (comment)
How did you test this PR?
Tested on both iOS and Android simulator. Screenshots attached.
geoJsonDataused in the code snippet below is from Google office documentation. https://developers.google.com/maps/documentation/javascript/datalayer#googlejson