Repository navigation
How to render satellite imagery as a background while keeping layers from a custom map style? #952
Answered
by
KiwiKilian
victorcg03
asked this question in
Q&A
❓ How to render satellite imagery as a background while keeping layers from a custom map style?Hi everyone 👋 I'm working on a React Native app using Here is my current setup: <MapView
ref={mapRef}
style={styles.map}
zoomEnabled
scrollEnabled
pitchEnabled
rotateEnabled
logoEnabled={false}
compassEnabled
compassViewPosition={1}
onRegionDidChange={handleRegionChange}
localizeLabels
mapStyle={require("../root2.json")} // Custom style with boundaries, labels, etc.
>
{/* Satellite imagery as background */}
<RasterSource
id="esri-imagery"
tileSize={512}
tileUrlTemplates={[
"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
]}
>
<RasterLayer
id="esri-imagery-layer"
sourceID="esri-imagery"
style={{ rasterOpacity: 1 }}
/>
</RasterSource>
<UserLocation
animated
visible
renderMode="normal"
androidRenderMode="normal"
showsUserHeadingIndicator
/>
<Camera
ref={cameraRef}
maxZoomLevel={20}
animationDuration={2000}
animationMode="flyTo"
defaultSettings={{
centerCoordinate: [currentRegion.longitude, currentRegion.latitude],
zoomLevel: 15,
}}
/>
</MapView>As soon as I add the What I would like to achieve is:
Questions:
Thanks in advance for any help or ideas 🙏 |
Answered by
KiwiKilian
Aug 3, 2025
Replies: 1 comment 3 replies
|
You can direct your |
3 replies
Answer selected by
KiwiKilian
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can direct your
RasterLayerto be placed above or below a specific layer using theaboveLayerIDorbelowLayerID.