Comments (3)
In release mode the addImage
method of RCTMGLStyle
returns without downloading the asset. The reason is that RCTMGLStyleValue
's shouldAddImage
always returns false.
We have:
public boolean shouldAddImage() {
return isAddImage;
}
isAddImage = imageURI != null && imageURI.contains("://");
But the image uri would fulfil the condition only in debug mode as it is of the following form:
- debug: "http://10.0.2.2:8081/assets/src/img/image.png?platform=android&hash=6b83f13973da21d525cf33f4c1b17a45"
- release: "src_img_image"
Applying this change fixes the problem, but it might introduce other flaws
- isAddImage = imageURI != null && imageURI.contains("://");
+ isAddImage = imageURI != null;
Concerning the asset rendering in black, it happens only within the simulator for me. It's probably a totally different issue.
from maps.
FYI, emulator GL rendering can be quite flaky depending on underlying hardware and emulator in use. I suggest you check that against a real device.
from maps.
@alexisrougnant Thanks, yes not sure why is the imageURI.contains("://")
condition there. ImageURI can be a path, uri, bundled image name and maybe base64 images, but in any case we want to decode it.
Regarding the black icon, it works fine for me in android simulator. Not sure what's going on in that case for you. The image is clearly loaded just the colors are screwed up.
from maps.
Related Issues (20)
- [Bug]: Black map on iOS 8 simulator HOT 1
- Where are the types for rnmapbox? E.G: "FeatureCollection" types? HOT 4
- [Bug]: HeatmapLayer component doesnt take expression as CircleLayer (same one, but in heatmaplayer wont work) HOT 1
- [Bug]: The map displays in black HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 1
- [Bug]: onUpdate doesn't update the value in a ref HOT 4
- react-native : andorid build crash - Android version - above 11 HOT 1
- [Bug]: 3D (terrain) not working on iOS HOT 1
- [Bug]: abort mapbox HOT 1
- [Bug]: Abort android mapbox HOT 1
- [Bug]: PointAnnotation collection not being rendered on screen first render HOT 5
- [Bug]: Unexpected behavior with `belowLayerID` on Android HOT 5
- In example there is no env file exist therefore cant test the example app HOT 1
- [Bug]: Warning: Connect(Component): Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.
- [Bug]: filter property doesn't work on VectorSource HOT 1
- [Bug]: MarkerView not visible in Android but works in iOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maps.