構内図対応
This commit is contained in:
parent
9381e0ee15
commit
ffe18b8398
@ -14,7 +14,7 @@ export default [
|
||||
{"Station_JP" : "八幡浜", "Station_EN" : "Yawatahama", "MyStation" : "11", "StationNumber" : "U18", "DispNum" : "3", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/yawatahama.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.458146,132.436002", "JrHpUrl" : "http://www.jr-shikoku.co.jp/01_trainbus/kakueki/yawatahama/"},
|
||||
{"Station_JP" : "双岩", "Station_EN" : "Futaiwa", "MyStation" : "12", "StationNumber" : "U19", "DispNum" : "2", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/futaiwa.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.424669,132.457934", "JrHpUrl" : ""},
|
||||
{"Station_JP" : "伊予石城", "Station_EN" : "Iyo-Iwaki", "MyStation" : "13", "StationNumber" : "U20", "DispNum" : "2", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/iyo-iwaki.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.391413,132.473259", "JrHpUrl" : ""},
|
||||
{"Station_JP" : "卯之町", "Station_EN" : "Unomachi", "MyStation" : "14", "StationNumber" : "U22", "DispNum" : "3", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/unomachi.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.363175,132.509959", "JrHpUrl" : "http://www.jr-shikoku.co.jp/01_trainbus/kakueki/unomachi/"},
|
||||
{"Station_JP" : "卯之町", "Station_EN" : "Unomachi", "MyStation" : "14", "StationNumber" : "U22", "DispNum" : "3", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/unomachi.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.363175,132.509959", "JrHpUrl" : ""},
|
||||
{"Station_JP" : "下宇和", "Station_EN" : "Shimo-Uwa", "MyStation" : "15", "StationNumber" : "U23", "DispNum" : "2", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/shimo-uwa.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.349786,132.531172", "JrHpUrl" : ""},
|
||||
{"Station_JP" : "立間", "Station_EN" : "Tachima", "MyStation" : "16", "StationNumber" : "U24", "DispNum" : "2", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/tachima.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.296721,132.539509", "JrHpUrl" : ""},
|
||||
{"Station_JP" : "伊予吉田", "Station_EN" : "Iyo-Yoshida", "MyStation" : "17", "StationNumber" : "U25", "DispNum" : "2", "StationTimeTable" : "http://www.jr-shikoku.co.jp/01_trainbus/jikoku/pdf/iyo-yoshida.pdf", "StationMap":"https://www.google.co.jp/maps/place/33.273287,132.544098", "JrHpUrl" : ""},
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
Text,
|
||||
TouchableOpacity,
|
||||
} from "react-native";
|
||||
import AutoHeightImage from "react-native-auto-height-image";
|
||||
import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons";
|
||||
import ActionSheet from "react-native-actions-sheet";
|
||||
import Sign from "../../components/駅名表/Sign";
|
||||
@ -94,6 +95,13 @@ export const StationDeteilView = (props) => {
|
||||
setFavoriteStation={setFavoriteStation}
|
||||
/>
|
||||
))}
|
||||
{currentStation &&
|
||||
currentStation[0].JrHpUrl &&
|
||||
currentStation[0].StationNumber != "M12" && (
|
||||
<駅構内図 //高松/阿波池田&後免&須崎kounai.png児島例外/
|
||||
uri={currentStation[0].JrHpUrl.replace("/index.html", "/")}
|
||||
/>
|
||||
)}
|
||||
{currentStation && (
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
{!currentStation[0].JrHpUrl || (
|
||||
@ -291,6 +299,65 @@ const NexPreStationLine = ({
|
||||
);
|
||||
};
|
||||
|
||||
const 駅構内図 = (props) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
height: 50,
|
||||
backgroundColor: "#888A85",
|
||||
flexDirection: "column",
|
||||
alignContent: "center",
|
||||
alignItems: "center",
|
||||
margin: 2,
|
||||
}}
|
||||
onLongPress={() => Linking.openURL(props.uri + "images/kounai.gif")}
|
||||
onPress={() => setOpen(!open)}
|
||||
>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text
|
||||
style={{
|
||||
color: "white",
|
||||
textAlign: "center",
|
||||
textAlignVertical: "center",
|
||||
flex: 1,
|
||||
}}
|
||||
>
|
||||
{open ? "駅構内図を非表示" : "駅構内図を表示"}
|
||||
</Text>
|
||||
<View style={{ flex: 1 }} />
|
||||
</TouchableOpacity>
|
||||
<View>
|
||||
{open && (
|
||||
<>
|
||||
<AutoHeightImage
|
||||
source={{ uri: props.uri + "images/kounai.gif" }}
|
||||
resizeMode="contain"
|
||||
width={wp("100%")}
|
||||
/>
|
||||
<AutoHeightImage
|
||||
source={{ uri: props.uri + "images/kounai.png" }}
|
||||
resizeMode="contain"
|
||||
width={wp("100%")}
|
||||
/>
|
||||
<AutoHeightImage
|
||||
source={{ uri: props.uri + "images/kounai_1f.gif" }}
|
||||
resizeMode="contain"
|
||||
width={wp("100%")}
|
||||
/>
|
||||
<AutoHeightImage
|
||||
source={{ uri: props.uri + "images/kounai_2f.png" }}
|
||||
resizeMode="contain"
|
||||
width={wp("100%")}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const styleSheet = {
|
||||
外枠: {
|
||||
width: wp("80%"),
|
||||
|
Loading…
Reference in New Issue
Block a user