question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[7.0.9] Images/SymbolLayer not displaying images on Android

See original GitHub issue

Describe the bug We just updated to 7.0.9 from 7.0.8 and our MapboxGL.Images/MapboxGL.SymbolLayer are no longer appearing. Downgrading back to 7.0.8 solves the issue - but I’m wondering if we can get this to work on 7.0.9.

Code Example

...
<MapboxGL.Images images={image ? { [imageId]: image } : {}} />
<MapboxGL.ShapeSource
    id={`placeIconHolder:${id}`}
    shape={centerPoint}
    onPress={this.onPress}>
          {image && (
            <MapboxGL.SymbolLayer
              id={`placeIcon:${id}`}
              style={{
                iconImage: imageId,
                iconSize,
                iconAllowOverlap: true
              }}
            />
          )}
    </MapboxGL.ShapeSource>

Expected behavior MapboxGL.Images/MapboxGL.SymbolLayer should display as they do on 7.0.8

Versions (please complete the following information):

  • Platfrom: Android
  • Device: Pixel 3
  • OS: Android 10
  • SDK: Version 28
  • React Native Version: 0.61.5

Did something change in 7.0.9 that requires doing this process differently on Android? This behavior does not happen on iOS - images display fine on iOS on 7.0.9

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
kristfalcommented, Jan 21, 2020

This is an emulator issue with rendering sprites, and will not reproduce on device.

AFAIK, there is nothing we can do here, as it has been a long-standing issue with mapbox-gl-android and the standard android emulator.

0reactions
akunal1commented, Jul 4, 2022
import icon from '../assets/iconName.png';

 <MapboxGL.SymbolLayer
                id="singlePoint"
                filter={['!', ['has', 'point_count']]}
                // style={layerStyles.icon}
                style={{
                  iconImage: icon,
                  iconSize: 0.15, 
                  iconAllowOverlap: true,
                }}
     />
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix picture not showing up in phone gallery - YouTube
I can't see photos phone gallery -fixed Subscribe to my Channel: ...
Read more >
some images not load in android 7+ (api24+) - Stack Overflow
problem Solved! this problem happened because pictures size was 1300x900 . i change them to 700x300. now working nice good luck.
Read more >
Generic System Image - Android Developers
GSI includes core system functionalities in all devices running Android 9 and above; in other words, GSI does not include device ...
Read more >
Turn images on or off in Gmail - Android - Google Help
By default, when you get an email with an image, you'll see the image automatically. Always show images If images don't load in...
Read more >
Images not displaying in an email client
Apple Mail on iPhone/iPad; Gmail on Desktop, Android, and iPhone/iPad; Outlook (Outlook for Microsoft 365, Outlook 2007 to Outlook 2019) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found