NativeScript / NativeScript/plugins

Unable to change transparency on TileOverlay on Android

Open
#565 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
206
Forks
123
Avg merge
2d 1h
Merged PRs (30d)
1

Description

I'm migrating from the kefahB/nativescript-google-maps plugin to @nativescript/google-maps.
My app animates weather radar by composing an array of TileOverlays and then iteratively changing the TileOverlay's transparency to hide one overlay and display the next.

While transparency can be specified in the TileOverlayOptions when creating a TileOverlay, it can't be modified directly afterwards. Instead, you have to use native methods, such as on iOS:

tileOverlay.native.opacity = 1.0;  // display tileOverlay

On Android, there's:

tileOverlay.native.setTransparency(0.0);  // display tileOverlay

But this seems to have no effect. I can see in the debugger and via tileOverlay.native.getTransparency() that the native TileOverlay's transparency property has indeed been changed, but there is no change in the display.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Android TileOverlay implementation exposed through tileOverlay.native and trace setTransparency alongside transparency in TileOverlayOptions. Reproduce the radar-overlay update on Android and verify that changing transparency after creation changes the rendered overlay.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, typescript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.