-
-
Notifications
You must be signed in to change notification settings - Fork 858
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add raster layer example (#3180)
* chore: raster layer example
- Loading branch information
Showing
12 changed files
with
152 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import { | ||
Images, | ||
MapView, | ||
RasterLayer, | ||
RasterSource, | ||
Camera, | ||
} from '@rnmapbox/maps'; | ||
|
||
const styles = { | ||
matchParent: { flex: 1 }, | ||
}; | ||
|
||
export default function RasterSourceExample() { | ||
return ( | ||
<MapView style={styles.matchParent}> | ||
<Camera | ||
defaultSettings={{ | ||
centerCoordinate: [-74.00597, 40.71427], | ||
zoomLevel: 14, | ||
}} | ||
/> | ||
<RasterSource | ||
id="stamen-watercolor" | ||
titleSize={256} | ||
tileUrlTemplates={['https://tile.openstreetmap.org/{z}/{x}/{y}.png']} | ||
/> | ||
<RasterLayer | ||
id="stamen-watercolor-layer" | ||
sourceID="stamen-watercolor" | ||
style={{ rasterOpacity: 0.85 }} | ||
/> | ||
</MapView> | ||
); | ||
} | ||
|
||
/* end-example-doc */ | ||
|
||
/** @type ExampleWithMetadata['metadata'] */ | ||
const metadata = { | ||
title: 'Raster Source', | ||
tags: [], | ||
docs: '', | ||
}; | ||
RasterSourceExample.metadata = metadata; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export { default as ChoroplethLayerByZoomLevel } from './ChoroplethLayerByZoomLevel'; | ||
export { default as CustomVectorSource } from './CustomVectorSource'; | ||
export { default as GeoJSONSource } from './GeoJSONSource'; | ||
export { default as ImageOverlay } from './ImageOverlay'; | ||
export { default as IndoorBuilding } from './IndoorBuilding'; | ||
export { default as QueryAtPoint } from './QueryAtPoint'; | ||
export { default as QuerySourceFeatures } from './QuerySourceFeatures'; | ||
export { default as QueryWithRect } from './QueryWithRect'; | ||
export { default as RasterSource } from './RasterSource'; | ||
export { default as WatercolorRasterTiles } from './WatercolorRasterTiles'; | ||
|
||
export const metadata = { | ||
title: 'Fill/Raster Layer', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters