Skip to content

Commit

Permalink
Adding overlaying components details (#2425)
Browse files Browse the repository at this point in the history
How to overlay other React components on top of the `MapView`. This was not clear from the documentation and took some research to find a solution.
  • Loading branch information
SKempin authored and christopherdro committed Aug 14, 2018
1 parent 83c1a01 commit 108bf75
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,23 @@ For Android: LocalTile is still just overlay over original map tiles. It means t

See [OSM Wiki](https://wiki.openstreetmap.org/wiki/Category:Tile_downloading) for how to download tiles for offline usage.

### Overlaying other components on the map

Place components you that wish to overlay `MapView` underneath the `MapView` closing tag. Absolutely position these elements.

```jsx
render() {
return (
<MapView
region={this.state.region}
/>
<OverlayComponent
style={{position: “absolute”, bottom: 50}}
/>
);
}
```

### Customizing the map style

Create the json object, or download a generated one from the [google style generator](https://mapstyle.withgoogle.com/).
Expand Down

0 comments on commit 108bf75

Please sign in to comment.