Skip to content

Commit

Permalink
Update docs from maps rnmapbox/maps@7fbc756
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 13, 2025
1 parent 3e86151 commit 5b79cda
Show file tree
Hide file tree
Showing 52 changed files with 114 additions and 55 deletions.
Binary file modified docs/examples/Annotations/CustomCallout.png
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 docs/examples/Annotations/Heatmap.png
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 docs/examples/Annotations/MarkerView.png
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 docs/examples/Annotations/PointAnnotationAnchors.png
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 docs/examples/Annotations/ShowPointAnnotation.png
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 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.
Binary file modified docs/examples/FillRasterLayer/CustomVectorSource.png
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 docs/examples/FillRasterLayer/GeoJSONSource.png
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 docs/examples/FillRasterLayer/ImageOverlay.png
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 docs/examples/FillRasterLayer/IndoorBuilding.png
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 docs/examples/FillRasterLayer/QueryAtPoint.png
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 docs/examples/FillRasterLayer/QuerySourceFeatures.png
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 docs/examples/FillRasterLayer/QueryWithRect.png
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 docs/examples/FillRasterLayer/RasterSource.png
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 docs/examples/FillRasterLayer/WatercolorRasterTiles.png
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 docs/examples/Map/ChangeLayerColor.png
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 docs/examples/Map/CreateOfflineRegion.png
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 docs/examples/Map/DynamicUrl.png
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 docs/examples/Map/LocalizeLabels.png
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 docs/examples/Map/MapAndRNNavigation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/examples/Map/MapUnMount.md
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;


```

}

Binary file modified docs/examples/Map/OfflineExample.png
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 docs/examples/Map/Ornaments.png
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 docs/examples/Map/PointInMapView.png
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 docs/examples/Map/ShowAndHideLayer.png
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 docs/examples/Map/ShowClick.png
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 docs/examples/Map/ShowMap.png
Binary file modified docs/examples/Map/ShowMapLocalStyle.png
Binary file modified docs/examples/Map/ShowRegionDidChange.png
Binary file modified docs/examples/Map/SourceLayerVisibility.png
Binary file modified docs/examples/Map/StyleJson.png
Binary file modified docs/examples/Map/TwoByTwo.png
Binary file modified docs/examples/SymbolCircleLayer/CustomIcon.png
Binary file modified docs/examples/SymbolCircleLayer/CustomIconNativeAsset.png
Binary file modified docs/examples/SymbolCircleLayer/DataDrivenCircleColors.png
Binary file modified docs/examples/SymbolCircleLayer/Earthquakes.png
Binary file modified docs/examples/SymbolCircleLayer/ScalableImages.png
Binary file modified docs/examples/SymbolCircleLayer/ShapeSourceIcon.png
Binary file modified docs/examples/UserLocation/CustomNativeUserLocation.png
Binary file modified docs/examples/UserLocation/SetDisplacement.png
Binary file modified docs/examples/UserLocation/SetTintColor.png
Binary file modified docs/examples/UserLocation/UserLocationPadding.png
Binary file modified docs/examples/UserLocation/UserLocationRenderMode.png
Binary file modified docs/examples/UserLocation/UserLocationUpdates.png
Binary file modified docs/examples/V10/CameraAnimation.png
Binary file modified docs/examples/V10/GlobeProjection.png
Binary file modified docs/examples/V10/MapHandlers.png
Binary file modified docs/examples/V10/Markers.png
Binary file modified docs/examples/V10/QueryTerrainElevation.png
Binary file modified docs/examples/V10/TerrainSkyAtmosphere.png

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/example-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
</noscript>
<!-- The root element for your Expo app. -->
<div id="root"></div>
<script src="/example-app/_expo/static/js/web/AppEntry-8fd4045ab7d36f0629fd972e90945c16.js" defer></script>
<script src="/example-app/_expo/static/js/web/AppEntry-baf6dc932179b121467d3d6a43e94e38.js" defer></script>
</body>
</html>

0 comments on commit 5b79cda

Please sign in to comment.