[TIMOB-25567] Android: customView of Map.Annotation won't show the first time app runs if it has an image
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 6.3.0, Release 8.0.2 |
Fix Version/s | n/a |
Components | Android |
Labels | engSchedule, map, mapView |
Reporter | Guillermo Figueras |
Assignee | Gary Mathews |
Created | 2017-11-24T11:22:10.000+0000 |
Updated | 2019-07-30T15:39:49.000+0000 |
Description
When using customView property on an Annotation which contains an ImageView and a Label, the first time you open the app you won't see the image. If you go back and open the map again, the images will show.
I uploaded a couple of files. One of them is a video showing the bug, the other one is a test case project (remember to change google maps API_KEY on tiapp.xml).
Attachments
Hello [~gfigueras], Thanks for sharing with us. We have tested the issue on HUAWEI GR3 2017 using SDK 6.3.0.GA with the sample project provided by you but unable to produce the issue. When we press "Click here" the pages shows nothing. Only a white blank [page](https://s19.postimg.org/7yn43ze9v/imgpsh_fullsize2.jpg) is visible. Please share us a complete reproducible test case to reproduce the issue on our end. Thanks
That's because you have to use your own google maps API key https://i.imgur.com/KeCVm3y.png http://docs.appcelerator.com/platform/latest/#!/guide/Google_Maps_v2_for_Android-section-src-36739898_GoogleMapsv2forAndroid-ObtainandAddaGoogleAPIKey
Well, I came up with a solution for the images not showing, just in case someone is facing the same problem. At first I was adding an ImageView and a Label inside a View, which was the customView of the Annotation, but now instead of doing that, I'm doing this:
Anyways, customView property isn't working properly if you add an ImageView to it.
This should be fixed by https://github.com/appcelerator-modules/ti.map/releases/tag/android-4.1.1
I tried the old code (the one attached to the ticket) with the new ti.map version but the bug is still there.