I am trying to update raster tile layer map service url but it is not not working for me.
<MapboxGL.RasterSource id="id5"
tileUrlTemplates={[this.state.rasterUrl]}
minZoomLevel={15} tileSize={256}>
<MapboxGL.RasterLayer id="id5" source="id5" />
</MapboxGL.RasterSource>
I have issue like : https://github.com/nitaliano/react-native-mapbox-gl/issues/1077
Anyone idea. How can i fixed?
Related
I have tried to implement a shape file on a leaflet using this example
https://codesandbox.io/s/add-zipped-shapefiles-to-a-react-leaflet-map-e7cr0?file=/src/Shapefile.jsx
I was able draw shape file on leaflet using this example in react version 16. I am not able to make it work in react version above versions. I am not sure why it is not working in above versions.
I am getting this error when "Unable to construct Url: invalid URL at checksuffix and shp.getShapeFile"
I have created a custom tile on mapbox studio and it is visible correctly on the studio but when I use that tile ID in my kotlin code using the Vector source, it does not show, although the logcat shows the request is successful. The tileset I created is also set to public. Even though I've tried loading the built in tile of mapbox "mapbox://mapbox.mapbox-terrain-v2" which is taken from the github repository of mapbox here. This one shown below is also not visible on android although it is visible on mapbox studio.
style.addSource(
VectorSource("terrain-data", "mapbox://mapbox.mapbox-terrain-v2")
)
style.addLayer(
LineLayer("terrain-layer", "terrain-data")
.withProperties(
PropertyFactory.lineJoin(Property.LINE_JOIN_ROUND),
PropertyFactory.lineCap(Property.LINE_CAP_ROUND),
PropertyFactory.lineColor(Color.parseColor("#ff69b4")),
PropertyFactory.lineWidth(1.9f)
)
)
Any help would be appreciated. Thanks!!
I got it working after adding the name of source layer (that can be found on the top left corner, when you open the custom tileset), like below:
Custom Tileset
LineLayer("terrain-layer", "terrain-data").withSourceLayer("name_of_source_layer")
I am a beginner with React Native.
I'm using Expo on Windows 10 and testing on an iPhone.
I need to create a map with custom tiles.
After some research I find out that Leaflet is not React Native compatible so I have to use react-native-maps.
I install it and create my first basic map, so far so good (Apple Maps).
Then I tried to apply the custom tiles. For performance reasons I want to use local tiles. Here came the question of how to get the local link of my tiles (located in "assets/tiles").
While searching I realize that I need to use react-native-fs to use the following path file://${RNFS.DocumentDirectoryPath}.
I install it.
However, when I try to add react-native-fs using
var RNFS = require('react-native-fs');
I get the error :
Invariant Violation: Native module cannot be null.
and I'm lost and don't know if I'm going the right way.
Thanks
I'm building a Quran reading option in an React-native app. I have some troubles finding the right approche concerning using pdf or png images.
I have tried react-native-pdf but i have some issues. The png option gives the best rendering result in 'PORTRAIT' but in 'LANDSCAPE' the image cant be scrolled vertically to see the entire image; ive tried scrollView inside FlatList.
Thanks!
Avoid PDF.
Check this repository:
https://github.com/semarketir/quranjson
It contains everything you need to build a quran app in react and host everything in your own server or offline
Use this if you want more control:
https://alquran.cloud/api
But it will require the user to be online
On the github README page of react-native-webgl here there is a mention of react-native-webgl-camera without any samples.
Anyone knows how to use it? Any working example with Three.js as a texture?