capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

[google-maps] remote marker shows default marker on IOS when marker not yet loaded

Open ngmiduc opened this issue 1 year ago • 1 comments

Bug Report

Plugin(s)

"@capacitor/google-maps": "^5.3.3"

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 5.6.0
  @capacitor/core: 5.6.0
  @capacitor/android: 5.6.0
  @capacitor/ios: 5.6.0

Installed Dependencies:

  @capacitor/cli: 5.0.4
  @capacitor/core: 5.0.4
  @capacitor/android: 5.0.4
  @capacitor/ios: 5.0.4

Platform(s)

IOS

Current Behavior

When a remote marker is loaded the IOS device is showing the red default marker until the image is loaded. The red default marker is also shown even if tintColor is used with tintColor: { r: 1, g: 1, b: 1, a: 1 }. Not sure if this is a but or a feature like this #1753

Expected Behavior

The red defaut marker should not be displayed.

Code Reproduction

https://stackblitz.com/edit/angular-yz24zb-xzeuvj?file=src%2Fapp%2Fexample.component.ts

  1. add API KEY to componentn: const apiKey = 'xxx';
  2. build app to IOS
  3. run on real device
  4. see before marker is loaded, the red default marker is visible

Other Technical Details

Reproduction code can be downloaded from stackblitz

Note

I remembered that there was this fix: #1667 - that was fixed in a previous release. Before the main thread was blocked so that the user couldn't interact anymore with the map until the remote marker was loaded. Now there is a new issue that the user can interact with the map, but the default red marker is shown until the remote marker is now loaded, which is also not an expected behavior.

ngmiduc avatar Dec 19 '23 09:12 ngmiduc

Here an additional screenshot for the issue. It is an example of a very slow connection. So the map shows the red markers until the remote marker is loaded:

Screenshot 2024-01-10 at 22 27 35

ngmiduc avatar Jan 10 '24 21:01 ngmiduc