nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 699 forks source link

Tiles Render out of order ZXY #1689

Closed Godhran closed 3 years ago

Godhran commented 3 years ago

Developing on latest XCode. Using code from the Watercolour example, images from the watercolor api appear out of order on the mapbox component

image

    render() {
const rasterSourceProps = {
      id: 'rasterMapSource',
      tileUrlTemplates: [
        'https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{y}/{x}.jpg',
      ],
      tileSize: 256,
    };
        return (
        <Fragment>
                  <MapboxGL.MapView
                            styleURL={'MY STYLE'}
                            style={styles.matchParent}
                            rotateEnabled={false}
                            >

                            <MapboxGL.Camera
                                rotateEnalbed={false}
                                centerCoordinate={[-6.752471, 54.612243]}
                            />
                            <MapboxGL.RasterSource {...rasterSourceProps}>
                                        <MapboxGL.RasterLayer
                                          id="rasterMapLayer"
                                          sourceID="rasterMapSource"
                                          style={{rasterOpacity: 1}}
                                        />
                            </MapboxGL.RasterSource>

</MapboxGL.MapView>
            </Fragment>
        );
    }
};
Godhran commented 3 years ago

Literally noticed my error on posting. Had {z}, {x}, {y} in wrong order.

systemlevel commented 3 years ago

@Godhran This repo is no longer maintained. Get the RNMapbox community maintained repo here: https://github.com/react-native-mapbox-gl/maps