Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion mobile-app/app/(tabs)/maps.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { View, StyleSheet, Dimensions } from "react-native";
// @ts-ignore - react-native-maps has TypeScript compatibility issues with strict mode
import MapView, { Marker, Polyline } from "react-native-maps";
import MapView, { UrlTile, Marker, Polyline } from "react-native-maps";

// Sample coordinates for the route
const tokyoTower = {
Expand Down Expand Up @@ -38,6 +38,13 @@ export default function MapsScreen() {
return (
<View style={styles.container}>
<MapView style={styles.map} initialRegion={tokyoTower}>
{/* OpenStreetMap tile layer */}
<UrlTile
urlTemplate="https://tile.openstreetmap.org/{z}/{x}/{y}.png"
maximumZ={19}
minimumZ={1}
/>

{/* Markers for each location */}
<Marker
coordinate={tokyoTower}
Expand Down
3 changes: 2 additions & 1 deletion mobile-app/app/(tabs)/maps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ export default function MapsScreen() {
Map functionality is available on mobile platforms.
</Text>
<Text style={styles.subtitle}>
This feature uses react-native-maps which requires iOS or Android.
This feature uses OpenStreetMap with react-native-maps which requires
iOS or Android.
</Text>
<Text style={styles.routeInfo}>
Sample route: Tokyo Tower → Convenience Store 1 → Convenience Store 2 →
Expand Down
Loading