-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs from maps rnmapbox/maps@7fbc756
- Loading branch information
1 parent
3e86151
commit 5b79cda
Showing
52 changed files
with
114 additions
and
55 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
docs/examples/FillRasterLayer/ChoroplethLayerByZoomLevel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
--- | ||
title: Map (un-)mount | ||
tags: [] | ||
custom_props: | ||
example_rel_path: Map/MapUnMount.tsx | ||
custom_edit_url: https://github.com/rnmapbox/maps/tree/master/example/src/examples/Map/MapUnMount.tsx | ||
--- | ||
|
||
Showing and hiding the the map should not lead to increased memory consumption, use this example to check it on the profiler. | ||
|
||
|
||
```jsx | ||
import React, { useState, useEffect } from 'react'; | ||
import Mapbox from '@rnmapbox/maps'; | ||
import { Button } from '@rneui/base'; | ||
|
||
import sheet from '../../styles/sheet'; | ||
import { ExampleWithMetadata } from '../common/ExampleMetadata'; // exclude-from-doc | ||
|
||
const MapUnMount = () => { | ||
const [isMounted, setIsMounted] = useState(true); | ||
|
||
useEffect(() => { | ||
Mapbox.locationManager.start(); | ||
|
||
return (): void => { | ||
Mapbox.locationManager.stop(); | ||
}; | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<Button | ||
onPress={() => setIsMounted((mounted) => !mounted)} | ||
title={isMounted ? 'unmount MapView' : 'mount MapView'} | ||
/> | ||
{isMounted ? ( | ||
<Mapbox.MapView | ||
styleURL={Mapbox.StyleURL.Dark} | ||
style={sheet.matchParent} | ||
testID={'show-map'} | ||
> | ||
<Mapbox.Camera followZoomLevel={12} followUserLocation /> | ||
|
||
<Mapbox.UserLocation /> | ||
</Mapbox.MapView> | ||
) : null} | ||
</> | ||
); | ||
}; | ||
|
||
export default MapUnMount; | ||
|
||
|
||
``` | ||
|
||
} | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
109 changes: 55 additions & 54 deletions
109
...Entry-8fd4045ab7d36f0629fd972e90945c16.js → ...Entry-baf6dc932179b121467d3d6a43e94e38.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters