Environment fix for Android and UI preparations

This commit is contained in:
2026-07-28 19:42:11 +02:00
parent 31de1c1526
commit 6ac78ea6a1
15 changed files with 447 additions and 317 deletions
+5 -52
View File
@@ -70,58 +70,11 @@ export function FeatureMap({
}
return (
<View style={styles.container}>
<MapView
ref={mapRef}
style={StyleSheet.absoluteFill}
provider={MAP_PROVIDER}
initialRegion={region}
showsUserLocation
>
{shaped.map(({ feature, shapes }) => {
const color = colorFor(feature.status);
const selected = feature.id === selectedId;
const stroke = selected ? '#000' : color;
return (
<React.Fragment key={feature.id}>
{shapes.points.map((p, i) => (
<Marker
key={`pt${feature.id}-${i}`}
coordinate={p}
pinColor={color}
title={feature.name}
onPress={() => onSelect(feature.id)}
/>
))}
{shapes.lines.map((line, i) => (
<Polyline
key={`ln${feature.id}-${i}`}
coordinates={line}
strokeColor={stroke}
strokeWidth={selected ? 5 : 3}
tappable
onPress={() => onSelect(feature.id)}
/>
))}
{shapes.polygons.map((poly, i) => (
<Polygon
key={`pg${feature.id}-${i}`}
coordinates={poly}
strokeColor={stroke}
fillColor={`${color}55`}
strokeWidth={selected ? 4 : 2}
tappable
onPress={() => onSelect(feature.id)}
/>
))}
</React.Fragment>
);
})}
</MapView>
<TouchableOpacity style={styles.locBtn} onPress={() => void recenter()}>
<Text style={styles.locIcon}></Text>
</TouchableOpacity>
<View style={[styles.container, { backgroundColor: '#f0f0f0', justifyContent: 'center', alignItems: 'center' }]}>
<Text style={{ color: COLORS.muted, textAlign: 'center' }}>
Mapa desactivado temporalmente para pruebas.{"\n"}
Requiere API Key de Google Maps válida.
</Text>
</View>
);
}