-
-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: On Initial zoom Features are not getting rendered #2408
Comments
@mfazekas @naftalibeder @justsml @davicedraz @arcticfly @YeshanJay @AlexanderLourenco |
I've seen a similar bug intermittently on Android. @sarath40158 does this bug consistently affect iOS, and does it never affect Android? |
@arcticfly |
@mfazekas @naftalibeder @justsml @davicedraz @YeshanJay @AlexanderLourenco |
@sarath40158 please stop spamming everybody. You can try to investigate yourself and fix it. Otherwise be patient until somebody else picks up on the issue. As I see you already figured, this might be a upstream problem mapbox/mapbox-maps-ios#1436. I can only reproduce with |
Hi, please don’t spam everyone. Can you share a true standalone component, rather than part of one? If you’re in a hurry, you can also investigate yourself. I would suggest first finding the most minimal version of this you can - does the bug still happen with a solid line? Is it the same with a different feature like a CircleLayer? The more specific the report, the more likely somebody will look into this. |
CircleLayer doesn't have pattern prop's to load. FillLayer has pattern prop. I can see same behaviour with FillLayer also. Here is true standalone component.
|
Any one facing same issue I has temporary fix File : RCTMGLStyle.m From :
To :
If any one facing pattern issue with images running on |
I could reproduce the issue with this code: import React from 'react';
import {
MapView,
Camera,
ShapeSource,
CircleLayer,
LineLayer,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[80.41956421171835, 16.29841309698017],
[80.41956421171835, 16.29835131091197],
[80.4195695761428, 16.29812476181567],
[80.41966613564813, 16.29497879163125],
[80.41966613564813, 16.294999387356782],
],
};
export class BugReportExample extends React.Component {
render() {
return (
<MapView style={{ flex: 1 }}>
<Camera
defaultSettings={{
centerCoordinate: [80.41956421171835, 16.29841309698017],
zoomLevel: 16,
}}
/>
<ShapeSource id={'idStreetLayer'} shape={aLine}>
<LineLayer
id={'idStreetLayer'}
sourceID={'ShapeSource'}
style={{
linePattern:
'https://docs.mapbox.com/mapbox-gl-js/assets/colorado_flag.png',
lineWidth: 32,
}}
/>
</ShapeSource>
</MapView>
);
}
}
export default BugReportExample; |
Sounds like an upstream issue for me, as a workaround you can use the images component, to download the images yourself and only add the layer when images are downloaded. |
Reported to upstream as 1751 |
I'm closing the issue for now. <LineLayer
id={'idStreetLayer'}
sourceID={'ShapeSource'}
style={{
linePattern:
'https://docs.mapbox.com/mapbox-gl-js/assets/colorado_flag.png',
The recommended way is: <Images
images={{'colorado-flag': {'url': 'https://docs.mapbox.com/mapbox-gl-js/assets/colorado_flag.png'}}}
/>
<LineLayer
id={'idStreetLayer'}
sourceID={'ShapeSource'}
style={{
linePattern: 'colorado-flag',
...
This should work for import-s as we know the image size, for url-s we still need to either add the ability to wait for all the url-s to load before, and only add layers once images are there. I'm closing this issue, if you still face the issue pls open a discussion to plan how to fix with 10.1. |
Mapbox Implementation
Mapbox GL
Mapbox Version
default
Platform
iOS
@rnmapbox/maps
version#main
Standalone component to reproduce
Observed behavior and steps to reproduce
Once if we ZoomIn and ZoomOut again they are getting rendered and able to see on map
Too re-produce this issue try to load any linePattern to Initial Camera Centre coordinate's
Expected behavior
Note : I see issue is in both Implementation mapbox and mapbox-gl
Notes / preliminary analysis
Additional links and references
RPReplay_Final1668421376.mov
The text was updated successfully, but these errors were encountered: