|
@ -16,24 +16,17 @@ export default function MapMarker({ |
|
|
...props |
|
|
...props |
|
|
}) { |
|
|
}) { |
|
|
console.log(pictures); |
|
|
console.log(pictures); |
|
|
|
|
|
const pictures_s = JSON.parse(pictures); |
|
|
return ( |
|
|
return ( |
|
|
<MapView.Marker coordinate={coordinate} {...props}> |
|
|
<MapView.Marker coordinate={coordinate} {...props}> |
|
|
<View> |
|
|
<View> |
|
|
<Image style={styles.markerPoint} resizeMode="stretch" source={image} /> |
|
|
<Image style={styles.markerPoint} resizeMode="stretch" source={image} /> |
|
|
</View> |
|
|
</View> |
|
|
<Callout tooltip> |
|
|
|
|
|
|
|
|
<Callout tooltip style={{ width: 250 }}> |
|
|
<View> |
|
|
<View> |
|
|
<View style={styles.container}> |
|
|
<View style={styles.container}> |
|
|
<Text>{"Título: \t" + title}</Text> |
|
|
|
|
|
<Text>{"Descrição: \t" + description}</Text> |
|
|
|
|
|
<Svg width={240} height={120}> |
|
|
|
|
|
<ImageSvg |
|
|
|
|
|
width={"100%"} |
|
|
|
|
|
height={"100%"} |
|
|
|
|
|
preserveAspectRatio="xMidYMid stretch" |
|
|
|
|
|
href={{ uri: JSON.parse(pictures)[0] }} |
|
|
|
|
|
/> |
|
|
|
|
|
</Svg> |
|
|
|
|
|
|
|
|
<Text style={styles.title}>{title}</Text> |
|
|
|
|
|
<Text style={styles.description}>{description}</Text> |
|
|
</View> |
|
|
</View> |
|
|
<View style={styles.arrow}></View> |
|
|
<View style={styles.arrow}></View> |
|
|
</View> |
|
|
</View> |
|
@ -43,17 +36,26 @@ export default function MapMarker({ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({ |
|
|
const styles = StyleSheet.create({ |
|
|
|
|
|
title: { |
|
|
|
|
|
fontWeight: "bold", |
|
|
|
|
|
fontSize: dimensions.text.secondary, |
|
|
|
|
|
alignSelf: "center", |
|
|
|
|
|
paddingBottom: dimensions.spacing.minimal_padding, |
|
|
|
|
|
}, |
|
|
|
|
|
description: { |
|
|
|
|
|
fontSize: dimensions.text.default, |
|
|
|
|
|
}, |
|
|
arrow: { |
|
|
arrow: { |
|
|
alignSelf: "center", |
|
|
alignSelf: "center", |
|
|
borderTopWidth: 20, |
|
|
|
|
|
borderRightWidth: 20, |
|
|
|
|
|
|
|
|
borderTopWidth: 15, |
|
|
|
|
|
borderRightWidth: 10, |
|
|
borderBottomWidth: 0, |
|
|
borderBottomWidth: 0, |
|
|
borderLeftWidth: 20, |
|
|
|
|
|
|
|
|
borderLeftWidth: 10, |
|
|
borderTopColor: colors.lightGray, |
|
|
borderTopColor: colors.lightGray, |
|
|
borderRightColor: "transparent", |
|
|
borderRightColor: "transparent", |
|
|
borderBottomColor: "transparent", |
|
|
borderBottomColor: "transparent", |
|
|
borderLeftColor: "transparent", |
|
|
borderLeftColor: "transparent", |
|
|
paddingBottom: 8, |
|
|
|
|
|
|
|
|
paddingBottom: 5, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
container: { |
|
|
container: { |
|
@ -62,18 +64,32 @@ const styles = StyleSheet.create({ |
|
|
backgroundColor: colors.lightestGray, |
|
|
backgroundColor: colors.lightestGray, |
|
|
borderColor: colors.lightGray, |
|
|
borderColor: colors.lightGray, |
|
|
borderRadius: 6, |
|
|
borderRadius: 6, |
|
|
borderWidth: 2, |
|
|
|
|
|
borderBottomWidth: 4, |
|
|
|
|
|
borderRightWidth: 4, |
|
|
|
|
|
padding: 15, |
|
|
|
|
|
height: 200, |
|
|
|
|
|
|
|
|
borderWidth: 4, |
|
|
|
|
|
borderTopWidth: 2, |
|
|
|
|
|
padding: dimensions.spacing.minimal_padding, |
|
|
|
|
|
width: 200, |
|
|
}, |
|
|
}, |
|
|
markerPoint: { |
|
|
markerPoint: { |
|
|
alignSelf: "center", |
|
|
alignSelf: "center", |
|
|
height: markerSize, |
|
|
height: markerSize, |
|
|
width: markerSize, |
|
|
width: markerSize, |
|
|
}, |
|
|
}, |
|
|
title: { |
|
|
|
|
|
fontWeight: "400", |
|
|
|
|
|
}, |
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
* NOTE: Code for displaying images inside MapMarker. Leaved here for possible |
|
|
|
|
|
* future needs |
|
|
|
|
|
* |
|
|
|
|
|
* |
|
|
|
|
|
* {pictures_s.length > 0 && ( |
|
|
|
|
|
* <Svg width={240} height={120}> |
|
|
|
|
|
* <ImageSvg |
|
|
|
|
|
* width={"100%"} |
|
|
|
|
|
* height={"100%"} |
|
|
|
|
|
* preserveAspectRatio="xMidYMid stretch" |
|
|
|
|
|
* href={{ uri: pictures_s[0] }} |
|
|
|
|
|
* /> |
|
|
|
|
|
* </Svg> |
|
|
|
|
|
* )} |
|
|
|
|
|
* |
|
|
|
|
|
*/ |