From 32b1e3d9834d9e42a14e6e5560c97d8de0c9f6b2 Mon Sep 17 00:00:00 2001 From: Tobias Date: Tue, 23 Apr 2024 11:54:31 +0200 Subject: [PATCH] Docs: Add TS types to initialViewState docs The types for `initialViewState` are a bit hard to find but can be pulled from https://github.com/visgl/react-map-gl/blob/master/src/mapbox/mapbox.ts#L38-L48. This change adds them to the docs explicitly. --- docs/api-reference/map.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-reference/map.md b/docs/api-reference/map.md index 7f1b5c20a..220244b62 100644 --- a/docs/api-reference/map.md +++ b/docs/api-reference/map.md @@ -119,7 +119,7 @@ If `undefined` is provided, removes terrain from the map. ### Camera options -#### `initialViewState`: object {#initialviewstate} +#### `initialViewState`: object (`MapProps['initialViewState']`) {#initialviewstate} The initial view state of the map. If specified, `longitude`, `latitude`, `zoom` etc. in props are ignored when constructing the map. Only specify `initialViewState` if `Map` is being used as an **uncontrolled component**. See [state management](../get-started/state-management.md) for examples.