Skip to content

Commit 2f11d8e

Browse files
committed
Added documentation for the ZoomableGlobe component
1 parent 6bae572 commit 2f11d8e

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ The above results in the following svg structure rendered by react:
104104

105105
- [`<ComposableMap />`](#ComposableMap-component)
106106
- [`<ZoomableGroup />`](#ZoomableGroup-component)
107+
- [`<ZoomableGlobe />`](#ZoomableGlobe-component)
107108
- [`<Geographies />`](#Geographies-component)
108109
- [`<Geography />`](#Geography-component)
109110
- [`<Markers />`](#Markers-component)
@@ -168,8 +169,8 @@ The default configuration of the projection:
168169
| center | Array | [0,0] |
169170
| disablePanning | Boolean | false |
170171
| style | Object | {} |
171-
| onMoveStart | Function | |
172-
| onMoveEnd | Function | |
172+
| onMoveStart | Function | &nbsp; |
173+
| onMoveEnd | Function | &nbsp; |
173174

174175
##### Zooming
175176

@@ -261,6 +262,21 @@ handleMoveEnd(newCenter) {
261262
...
262263
```
263264

265+
#### <a name="ZoomableGlobe-component"></a> `<ZoomableGlobe />`
266+
267+
`<ZoomableGlobe />` is a component used as a replacement for `<ZoomableGroup />` when making SVG globes. While `<ZoomableGroup />` is used for zooming and panning, `<ZoomableGlobe />` is used for zooming and rotation.
268+
269+
##### Props
270+
271+
| Property | Type | Default |
272+
| ---------------- |:--------------- | :----------------------------- |
273+
| zoom | Number | 1 |
274+
| center | Array | [0,0] |
275+
| style | Object | {} |
276+
| onMoveStart | Function | &nbsp; |
277+
| onMoveEnd | Function | &nbsp; |
278+
279+
Note that if you are using the `<ZoomableGlobe />` component together with the graticule, you will have to specify `<Graticule globe={true} />` for the graticule. See the [globe example](https://github.com/zcreativelabs/react-simple-maps/tree/master/examples/globe) for more information on how to use the `<ZoomableGlobe />` component.
264280

265281
#### <a name="Geographies-component"></a> `<Geographies />`
266282

@@ -635,6 +651,7 @@ The `<Graticule />` component can be used to add a graticule to the map. Note th
635651
| fill | String | "transparent" |
636652
| style | Object | `{ pointerEvents: "none" }` |
637653
| disableOptimization | Boolean | true |
654+
| Globe | Boolean | false |
638655
639656
### License
640657
MIT licensed. Copyright (c) Richard Zimerman 2017. See [LICENSE.md](https://github.com/zcreativelabs/react-simple-maps/blob/master/LICENSE) for more details.

0 commit comments

Comments
 (0)