nitaliano / react-native-mapbox-gl

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

Can I render non-geographical map tiles served by my own backend ? #1730

Open yunusyuksel opened 1 year ago

yunusyuksel commented 1 year ago

I need to render my own map tiles which is not based on geographical coordinate but the tiles come from point clouds.

I used the RasterSource with my url template. It fetches the tiles and display them, but in background there is still world-map. how can I remove that background default map ?

<View style={styles.container}>
        <Mapbox.MapView
          zoomLevel={0}
          styleUrl="http://192.168.2.101:3003/style.json"
          centerCoordinate={[0, 0]}
          style={styles.container}>
          <Mapbox.RasterSource
            id="myCustomTiles"
            url={'http://192.168.2.101:3003/tiles/{z}/{x}/{y}.png'}
            tileSize={512}
            maxZoomLevel={2}
            minZoomLevel={0}>
            <Mapbox.RasterLayer
              style={{rasterOpacity: 1}}
              id="customTileLayer"
              sourceID="myCustomTiles"
            />
          </Mapbox.RasterSource>
        </Mapbox.MapView>
      </View>