MapUILumi.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. visible={state.showStation}
  55. stationInfo={state.stationInfo}
  56. onFavorite={onFavorite}
  57. onClose={onCloseInfo}
  58. />
  59. </View>
  60. );
  61. }
  62. const styles = StyleSheet.create({
  63. logoView: {
  64. top: 0,
  65. left: 0,
  66. right: 0,
  67. bottom: 0,
  68. zIndex: 1,
  69. alignItems: 'center',
  70. position: 'absolute',
  71. justifyContent: 'center',
  72. paddingTop: isIOS ? statusHeight : 0
  73. },
  74. searchView: {
  75. ...$padding(8, 16, 16),
  76. backgroundColor: colorThemes
  77. },
  78. searchInput: {
  79. alignItems: 'center',
  80. borderWidth: 1,
  81. borderStyle: 'solid',
  82. borderRadius: 60,
  83. borderColor: colorAccent,
  84. flexDirection: 'row',
  85. paddingLeft: 16,
  86. paddingRight: 16,
  87. backgroundColor: 'rgba(255, 255, 255, 0.5)'
  88. },
  89. searchText: {
  90. flex: 1,
  91. color: '#444',
  92. padding: 8,
  93. fontSize: 15
  94. },
  95. mapContent: {
  96. top: 0,
  97. left: 0,
  98. right: 0,
  99. bottom: 0,
  100. zIndex: 2,
  101. position: 'absolute',
  102. }
  103. })