Skip to content

Commit

Permalink
chore: cleanup more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
KiwiKilian committed Dec 1, 2024
1 parent ece14e3 commit 0a235dd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 116 deletions.
4 changes: 0 additions & 4 deletions packages/examples/src/Examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ const Examples = new ExampleGroup(
MapLibreExamples.CustomVectorSource,
),
new ExampleItem("Image Overlay", MapLibreExamples.ImageOverlay),
new ExampleItem(
"Choropleth Layer by Zoom Level",
MapLibreExamples.ChoroplethLayerByZoomLevel,
),
]),
new ExampleGroup("LineLayer", [
new ExampleItem("Gradient Line", MapLibreExamples.GradientLine),
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export default function IndoorBuilding() {

<MapLibreGL.ShapeSource
id="indoorBuildingSource"
// @ts-ignore
shape={indoor3DFeatureCollection}
shape={indoor3DFeatureCollection as GeoJSON.FeatureCollection}
>
<MapLibreGL.FillExtrusionLayer
id="building3d"
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/src/examples/Map/SetTintColor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function SetTintColor() {
>
<MapLibreGL.MapView style={sheet.matchParent} tintColor={tintColor}>
<MapLibreGL.Camera
followZoomLevel={16}
followZoomLevel={6}
followUserMode={MapLibreGL.UserTrackingMode.FollowWithHeading}
followUserLocation
/>
Expand Down
20 changes: 10 additions & 10 deletions packages/examples/src/examples/SymbolCircleLayer/Earthquakes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import { colors } from "../../styles/colors";
import { sheet } from "../../styles/sheet";

const layerStyles: {
singlePoint: CircleLayerStyle;
clusteredPoints: CircleLayerStyle;
singleCircle: CircleLayerStyle;
clusteredCircle: CircleLayerStyle;
clusterCount: SymbolLayerStyle;
} = {
singlePoint: {
singleCircle: {
circleColor: "green",
circleOpacity: 0.84,
circleStrokeWidth: 2,
Expand All @@ -33,7 +33,7 @@ const layerStyles: {
circlePitchAlignment: "map",
},

clusteredPoints: {
clusteredCircle: {
circlePitchAlignment: "map",
circleColor: [
"step",
Expand Down Expand Up @@ -226,21 +226,21 @@ export default function Earthquakes() {
}}
>
<MapLibreGL.SymbolLayer
id="pointCount"
id="earthquakes-count"
style={layerStyles.clusterCount}
/>

<MapLibreGL.CircleLayer
id="clusteredPoints"
belowLayerID="pointCount"
id="earthquakes-cluster"
belowLayerID="earthquakes-count"
filter={["has", "point_count"]}
style={layerStyles.clusteredPoints}
style={layerStyles.clusteredCircle}
/>

<MapLibreGL.CircleLayer
id="singlePoint"
id="earthquakes-single"
filter={["!", ["has", "point_count"]]}
style={layerStyles.singlePoint}
style={layerStyles.singleCircle}
/>
</MapLibreGL.ShapeSource>
</MapLibreGL.MapView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function FollowUserLocationAlignment() {
style={sheet.matchParent}
contentInset={INSETS[alignment]}
>
<MapLibreGL.Camera followUserLocation />
<MapLibreGL.Camera followUserLocation followZoomLevel={6} />
<MapLibreGL.UserLocation />
</MapLibreGL.MapView>
</TabBarView>
Expand Down
1 change: 0 additions & 1 deletion packages/examples/src/examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export { default as TakeSnapshot } from "./Camera/TakeSnapshot";
export { default as TakeSnapshotWithMap } from "./Camera/TakeSnapshotWithMap";
export { default as YoYo } from "./Camera/YoYo";
// FILLRASTERLAYER
export { default as ChoroplethLayerByZoomLevel } from "./FillRasterLayer/ChoroplethLayerByZoomLevel";
export { default as CustomVectorSource } from "./FillRasterLayer/CustomVectorSource";
export { default as GeoJSONSource } from "./FillRasterLayer/GeoJSONSource";
export { default as ImageOverlay } from "./FillRasterLayer/ImageOverlay";
Expand Down

0 comments on commit 0a235dd

Please sign in to comment.