Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a map package from existing map data. #1193

Merged
merged 7 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
177 changes: 175 additions & 2 deletions apps/vite/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,94 +174,163 @@ const ProfileSettingsIndexLazyRoute = ProfileSettingsIndexLazyImport.update({
declare module '@tanstack/react-router' {
andrew-bierman marked this conversation as resolved.
Show resolved Hide resolved
interface FileRoutesByPath {
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexImport
parentRoute: typeof rootRoute
}
'/destination/query': {
id: '/destination/query'
path: '/destination/query'
fullPath: '/destination/query'
preLoaderRoute: typeof DestinationQueryLazyImport
parentRoute: typeof rootRoute
}
'/item/$itemId': {
id: '/item/$itemId'
path: '/item/$itemId'
fullPath: '/item/$itemId'
preLoaderRoute: typeof ItemItemIdLazyImport
parentRoute: typeof rootRoute
}
'/pack/$id': {
id: '/pack/$id'
path: '/pack/$id'
fullPath: '/pack/$id'
preLoaderRoute: typeof PackIdLazyImport
parentRoute: typeof rootRoute
}
'/pack/create': {
id: '/pack/create'
path: '/pack/create'
fullPath: '/pack/create'
preLoaderRoute: typeof PackCreateLazyImport
parentRoute: typeof rootRoute
}
'/profile/$id': {
id: '/profile/$id'
path: '/profile/$id'
fullPath: '/profile/$id'
preLoaderRoute: typeof ProfileIdLazyImport
parentRoute: typeof rootRoute
}
'/trip/$tripId': {
id: '/trip/$tripId'
path: '/trip/$tripId'
fullPath: '/trip/$tripId'
preLoaderRoute: typeof TripTripIdLazyImport
parentRoute: typeof rootRoute
}
'/trip/create': {
id: '/trip/create'
path: '/trip/create'
fullPath: '/trip/create'
preLoaderRoute: typeof TripCreateLazyImport
parentRoute: typeof rootRoute
}
'/about/': {
id: '/about/'
path: '/about'
fullPath: '/about'
preLoaderRoute: typeof AboutIndexLazyImport
parentRoute: typeof rootRoute
}
'/appearance/': {
id: '/appearance/'
path: '/appearance'
fullPath: '/appearance'
preLoaderRoute: typeof AppearanceIndexLazyImport
parentRoute: typeof rootRoute
}
'/dashboard/': {
id: '/dashboard/'
path: '/dashboard'
fullPath: '/dashboard'
preLoaderRoute: typeof DashboardIndexLazyImport
parentRoute: typeof rootRoute
}
'/feed/': {
id: '/feed/'
path: '/feed'
fullPath: '/feed'
preLoaderRoute: typeof FeedIndexLazyImport
parentRoute: typeof rootRoute
}
'/items/': {
id: '/items/'
path: '/items'
fullPath: '/items'
preLoaderRoute: typeof ItemsIndexLazyImport
parentRoute: typeof rootRoute
}
'/map/': {
id: '/map/'
path: '/map'
fullPath: '/map'
preLoaderRoute: typeof MapIndexLazyImport
parentRoute: typeof rootRoute
}
'/maps/': {
id: '/maps/'
path: '/maps'
fullPath: '/maps'
preLoaderRoute: typeof MapsIndexLazyImport
parentRoute: typeof rootRoute
}
'/packs/': {
id: '/packs/'
path: '/packs'
fullPath: '/packs'
preLoaderRoute: typeof PacksIndexLazyImport
parentRoute: typeof rootRoute
}
'/password-reset/': {
id: '/password-reset/'
path: '/password-reset'
fullPath: '/password-reset'
preLoaderRoute: typeof PasswordResetIndexLazyImport
parentRoute: typeof rootRoute
}
'/privacy/': {
id: '/privacy/'
path: '/privacy'
fullPath: '/privacy'
preLoaderRoute: typeof PrivacyIndexLazyImport
parentRoute: typeof rootRoute
}
'/profile/': {
id: '/profile/'
path: '/profile'
fullPath: '/profile'
preLoaderRoute: typeof ProfileIndexLazyImport
parentRoute: typeof rootRoute
}
'/register/': {
id: '/register/'
path: '/register'
fullPath: '/register'
preLoaderRoute: typeof RegisterIndexLazyImport
parentRoute: typeof rootRoute
}
'/sign-in/': {
id: '/sign-in/'
path: '/sign-in'
fullPath: '/sign-in'
preLoaderRoute: typeof SignInIndexLazyImport
parentRoute: typeof rootRoute
}
'/trips/': {
id: '/trips/'
path: '/trips'
fullPath: '/trips'
preLoaderRoute: typeof TripsIndexLazyImport
parentRoute: typeof rootRoute
}
'/profile/settings/': {
id: '/profile/settings/'
path: '/profile/settings'
fullPath: '/profile/settings'
preLoaderRoute: typeof ProfileSettingsIndexLazyImport
parentRoute: typeof rootRoute
}
Expand All @@ -270,7 +339,7 @@ declare module '@tanstack/react-router' {

// Create and export the route tree

export const routeTree = rootRoute.addChildren([
export const routeTree = rootRoute.addChildren({
IndexRoute,
DestinationQueryLazyRoute,
ItemItemIdLazyRoute,
Expand All @@ -294,6 +363,110 @@ export const routeTree = rootRoute.addChildren([
SignInIndexLazyRoute,
TripsIndexLazyRoute,
ProfileSettingsIndexLazyRoute,
])
})

/* prettier-ignore-end */

/* ROUTE_MANIFEST_START
{
"routes": {
"__root__": {
"filePath": "__root.tsx",
"children": [
"/",
"/destination/query",
"/item/$itemId",
"/pack/$id",
"/pack/create",
"/profile/$id",
"/trip/$tripId",
"/trip/create",
"/about/",
"/appearance/",
"/dashboard/",
"/feed/",
"/items/",
"/map/",
"/maps/",
"/packs/",
"/password-reset/",
"/privacy/",
"/profile/",
"/register/",
"/sign-in/",
"/trips/",
"/profile/settings/"
]
},
"/": {
"filePath": "index.tsx"
},
"/destination/query": {
"filePath": "destination/query.lazy.tsx"
},
"/item/$itemId": {
"filePath": "item/$itemId.lazy.tsx"
},
"/pack/$id": {
"filePath": "pack/$id.lazy.tsx"
},
"/pack/create": {
"filePath": "pack/create.lazy.tsx"
},
"/profile/$id": {
"filePath": "profile/$id.lazy.tsx"
},
"/trip/$tripId": {
"filePath": "trip/$tripId.lazy.tsx"
},
"/trip/create": {
"filePath": "trip/create.lazy.tsx"
},
"/about/": {
"filePath": "about/index.lazy.tsx"
},
"/appearance/": {
"filePath": "appearance/index.lazy.tsx"
},
"/dashboard/": {
"filePath": "dashboard/index.lazy.tsx"
},
"/feed/": {
"filePath": "feed/index.lazy.tsx"
},
"/items/": {
"filePath": "items/index.lazy.tsx"
},
"/map/": {
"filePath": "map/index.lazy.tsx"
},
"/maps/": {
"filePath": "maps/index.lazy.tsx"
},
"/packs/": {
"filePath": "packs/index.lazy.tsx"
},
"/password-reset/": {
"filePath": "password-reset/index.lazy.tsx"
},
"/privacy/": {
"filePath": "privacy/index.lazy.tsx"
},
"/profile/": {
"filePath": "profile/index.lazy.tsx"
},
"/register/": {
"filePath": "register/index.lazy.tsx"
},
"/sign-in/": {
"filePath": "sign-in/index.lazy.tsx"
},
"/trips/": {
"filePath": "trips/index.lazy.tsx"
},
"/profile/settings/": {
"filePath": "profile/settings/index.lazy.tsx"
}
}
}
ROUTE_MANIFEST_END */
7 changes: 2 additions & 5 deletions packages/app/components/card/LargeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,10 @@ const loadStyles = (theme: any) => {
flexDirection: 'column',
alignItems: 'center',
textAlign: 'center',
padding:
Platform.OS === 'web'
? currentTheme.size.cardPadding
: currentTheme.size.mobilePadding,
padding: Platform.OS === 'web' ? '5%' : currentTheme.size.mobilePadding,
paddingHorizontal: currentTheme.padding.paddingInside,
marginBottom: 20,
height: Platform.OS === 'web' ? 650 : '23%',
height: Platform.OS === 'web' ? 'calc(min( 80vh, 80vw))' : '23%',
minHeight: 350,
overflow: 'hidden',
},
Expand Down
14 changes: 6 additions & 8 deletions packages/app/components/destination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';
import { Platform, ScrollView, View } from 'react-native';
import { RButton, RStack, RText as OriginalRText } from '@packrat/ui';
import { RButton, RText as OriginalRText } from '@packrat/ui';
import useTheme from '../../hooks/useTheme';
import { MapContainer } from 'app/components/map';
import { defaultShape } from '../../utils/mapFunctions';
import { Map } from '@packrat/map';
import LargeCard from '../card/LargeCard';
import WeatherCard from '../weather/WeatherCard';
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import useCustomStyles from 'app/hooks/useCustomStyles';
import {
Expand Down Expand Up @@ -91,7 +89,7 @@ export const DestinationPage = () => {
} as any,
});

const shape = geoJSON ?? defaultShape;
const shape = geoJSON;

interface SearchResult {
properties: {
Expand Down Expand Up @@ -129,7 +127,7 @@ export const DestinationPage = () => {
}
};

const map = () => <MapContainer shape={shape} />;
const map = () => <Map shape={shape} />;

return (
<View style={styles.container}>
Expand Down Expand Up @@ -187,7 +185,7 @@ export const DestinationPage = () => {
geoJSON={geoJSON}
selectedSearchResult={currentDestination}
/>
{/* <LargeCard
<LargeCard
title="Map"
Icon={() => (
<Ionicons
Expand All @@ -199,7 +197,7 @@ export const DestinationPage = () => {
ContentComponent={map}
contentProps={{ shape }}
type="map"
/> */}
/>
<WeatherData latLng={latLng} />
</>
)}
Expand Down
46 changes: 0 additions & 46 deletions packages/app/components/map/MapContainer.native.tsx

This file was deleted.

Loading
Loading