Skip to content

Implement opacity prop for MapOverlay on Android and iOS (Google Maps)#3163

Merged
rborn merged 3 commits intoreact-native-maps:masterfrom
cropx:overlay_transparency
Mar 4, 2020
Merged

Implement opacity prop for MapOverlay on Android and iOS (Google Maps)#3163
rborn merged 3 commits intoreact-native-maps:masterfrom
cropx:overlay_transparency

Conversation

@JJStoker
Copy link
Copy Markdown

Does any other open PR do the same thing?

No.

What issue is this PR fixing?

We needed the ability to control the transparency/opacity of Overlay components. For some reason, the transparency control for GroundOverlay was commented out for Android and was never implemented for iOS.

The transparency option was implemented as opacity as the rest of this project seems to prefer opacity, and both platforms implemented it differently as well.

How did you test this PR?

Tested on an android emulator and iOS simulator using react-native@0.61.0 and using the branch HEAD "react-native-maps": "git://github.com/Crop-R/react-native-maps.git#5ee80e8d1e5af9962937d5db578d333fef4d35cb" as a dependency. We pass an image url to the image prop of MapView.Overlay.

- For some reason this property was disabled on Android.
- Transparency was not yet supported in the current google maps
implementation, but supported by the google maps API.
@rborn
Copy link
Copy Markdown
Collaborator

rborn commented Mar 4, 2020

LGTM

🐽 @christopherdro

I don't really get why travis is "yellow" the job seems to be executed with no error 😒

@rborn rborn merged commit 10b241c into react-native-maps:master Mar 4, 2020
@rborn
Copy link
Copy Markdown
Collaborator

rborn commented Mar 4, 2020

@JJStoker thanks for the PR 😻

pinpong pushed a commit to pinpong/react-native-maps that referenced this pull request Feb 28, 2025
react-native-maps#3163)

* Enable transparency controls for AirMapOverlay

- For some reason this property was disabled on Android.

* Add transparency support to AIRGoogleMapOverlay

- Transparency was not yet supported in the current google maps
implementation, but supported by the google maps API.

* Add opacity to Overlay props
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.

3 participants