MapUILumi.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /**
  2. * 首页地图LUMI定制布局
  3. * @邠心vbe on 2024/05/09
  4. */
  5. import React from 'react';
  6. import { View, Pressable, Image, StyleSheet } from 'react-native';
  7. import Maps from './maps/Maps';
  8. import MapTool from './maps/MapTool';
  9. import SearchTool from './maps/SearchTool';
  10. import BottomSiteInfo from './maps/BottomSiteInfo';
  11. import FilterTop from './maps/FilterTop';
  12. import { BottomSiteCard } from './maps/BottomSiteCard';
  13. export default MapUILumi = ({
  14. state,
  15. navigation,
  16. onFilter,
  17. onMapReady,
  18. onFavorite,
  19. onLocation,
  20. onCloseInfo,
  21. useApplesMap,
  22. showUserLocation,
  23. viewChargeStation
  24. }) => {
  25. return (
  26. <View style={styles.mapContent}>
  27. {/* this.state.hasPermission &&*/}
  28. <Maps.Maps3
  29. region={state.region}
  30. stopList={state.stopList}
  31. onMapReady={onMapReady}
  32. useApplesMap={useApplesMap}
  33. onMarkerPress={viewChargeStation}
  34. showUserLocation={showUserLocation}
  35. />
  36. <SearchTool
  37. count={state.stopList?.length}
  38. mapReady={state.mapReady}
  39. onFilter={onFilter}
  40. onLocation={onLocation}
  41. navigation={navigation}
  42. />
  43. <FilterTop
  44. onFilter={onFilter}
  45. onLocation={onLocation}
  46. />
  47. {/* <MapTool
  48. count={state.stopList?.length}
  49. mapReady={state.mapReady}
  50. onFilter={onFilter}
  51. onLocation={onLocation}
  52. /> */}
  53. <BottomSiteCard
  54. stationInfo={state.stationInfo}
  55. onFavorite={onFavorite}
  56. onClose={onCloseInfo}
  57. />
  58. </View>
  59. );
  60. }
  61. const styles = StyleSheet.create({
  62. logoView: {
  63. top: 0,
  64. left: 0,
  65. right: 0,
  66. bottom: 0,
  67. zIndex: 1,
  68. alignItems: 'center',
  69. position: 'absolute',
  70. justifyContent: 'center',
  71. paddingTop: isIOS ? statusHeight : 0
  72. },
  73. searchView: {
  74. ...$padding(8, 16, 16),
  75. backgroundColor: colorThemes
  76. },
  77. searchInput: {
  78. alignItems: 'center',
  79. borderWidth: 1,
  80. borderStyle: 'solid',
  81. borderRadius: 60,
  82. borderColor: colorAccent,
  83. flexDirection: 'row',
  84. paddingLeft: 16,
  85. paddingRight: 16,
  86. backgroundColor: 'rgba(255, 255, 255, 0.5)'
  87. },
  88. searchText: {
  89. flex: 1,
  90. color: '#444',
  91. padding: 8,
  92. fontSize: 15
  93. },
  94. mapContent: {
  95. top: 0,
  96. left: 0,
  97. right: 0,
  98. bottom: 0,
  99. zIndex: 2,
  100. position: 'absolute',
  101. }
  102. })