diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..eec36f5 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# React Native Raster Maps + +Based on https://pigeon-maps.js.org/. + +## Usage: + +``` +<Map + center={[55.796289, 49.108795]} + zoom={6} + provider={providers['osm']} + features={[ + { type: "multiline", coords: [[55.796289, 49.108795], [55.790289, 49.108095]] }, + { type: "polygon", coords: [[55.706289, 49.108795], [55.790289, 49.118095], [55.700289, 49.128095]] } + ]} + onBoundsChanged={this.onBoundsChanged} +> + <Marker coords={[55.796289, 49.108795]} height={32} width={32} style={{ height: 32, width: 32, borderRadius: 16, backgroundColor: '#f00' }} /> + <Marker coords={[55.790289, 49.108095]} height={32} width={32} style={{ height: 32, width: 32, borderRadius: 16, backgroundColor: '#f00' }} /> +</Map> +``` + +## Providers: + +* osm +* otm +* digiglobe +* wikimedia +* stamen +* sputnik +* wikimapia +* dark + +Own provider: + +``` +<Map + provider={(x,y,z,dpr) => `http://map.example.ru/${x}/${y}/${z}.png`} +/> +```
\ No newline at end of file |