Skip to content
Open
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
7 changes: 0 additions & 7 deletions .gitignore

This file was deleted.

21 changes: 21 additions & 0 deletions components/Map.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import { Content, Container, Header, Title, Button, Left, Right, Body, Icon, Tab, Tabs, ScrollableTab } from 'native-base';
import MapView, { Marker, Circle, PROVIDER_GOOGLE } from 'react-native-maps'; // remove PROVIDER_GOOGLE import if not using Google Maps


const Map = (props) =>
<Container style={{ maxHeight:"100%"}}>
<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={ {height:"100%"} }
region={{
latitude: props.latitude,
longitude: props.longitude,
latitudeDelta: 0.15,
longitudeDelta: 0.0121,
}}
>
</MapView>
</Container>

export default Map
40 changes: 30 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 4 additions & 20 deletions screens/LinksScreen.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
import React from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import { ExpoLinksView } from '@expo/samples';
import { Content, Container, Header, Title, Button, Left, Right, Body, Icon, Tab, Tabs, ScrollableTab } from 'native-base';
import MapView, { Marker, Circle, PROVIDER_GOOGLE } from 'react-native-maps'; // remove PROVIDER_GOOGLE import if not using Google Maps
import Map from './../components/Map.js'


export default class LinksScreen extends React.Component {
static navigationOptions = {
header: null,
}
render() {

const MapComponent = () =>
<Container style={{ maxHeight:"100%"}}>
<MapView
provider={PROVIDER_GOOGLE} // remove if not using Google Maps
style={ {height:"100%"} }
region={{
latitude: 37.78825,
longitude: -122.4324,
latitudeDelta: 0.015,
longitudeDelta: 0.0121,
}}
>
</MapView>
</Container>

return (
<ScrollView>
<MapComponent/>
<Map latitude={37.78825}
longitude={-122.4324}
/>
</ScrollView>
);
}
Expand Down