Google-maps-react: How to select default mapTypeId.

Created on 6 Aug 2020  路  2Comments  路  Source: fullstackreact/google-maps-react

Google Maps allow to modify the style of map even there is option to add cloud based map styling. How can I select default map type e.g "satellite"

https://developers.google.com/maps/documentation/javascript/maptypes

Most helpful comment

@AxeemHaider You can pass the prop "mapType" to the Map component (unfortunately it's not typed in the IMapProps interface):

<Map google={this.props.google} zoom={14} mapType="satellite" />

All 2 comments

@AxeemHaider You can pass the prop "mapType" to the Map component (unfortunately it's not typed in the IMapProps interface):

<Map google={this.props.google} zoom={14} mapType="satellite" />

<Map google={google} mapType="satellite" centerAroundCurrentLocation />

Was this page helpful?
0 / 5 - 0 ratings