AMap.js 747 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * A smart AMap Library for react-native apps
  3. * https://github.com/react-native-component/react-native-smart-amap/
  4. * Released under the MIT license
  5. * Copyright (c) 2016 react-native-component <moonsunfall@aliyun.com>
  6. */
  7. import {
  8. Platform
  9. } from 'react-native';
  10. import AndroidAMap, {AMapUtilityAndroid, AMapSearchAndroid} from './AMap-android';
  11. import IOSAMap, {AMapUtilityIOS, AMapSearchIOS} from './AMap-ios';
  12. let AMap;
  13. let AMapUtility;
  14. let AMapSearch;
  15. if(Platform.OS == 'ios') {
  16. AMap = IOSAMap;
  17. AMapUtility = AMapUtilityIOS;
  18. AMapSearch = AMapSearchIOS;
  19. }
  20. else {
  21. AMap = AndroidAMap;
  22. AMapUtility = AMapUtilityAndroid;
  23. AMapSearch = AMapSearchAndroid;
  24. }
  25. export default AMap;
  26. export {AMapUtility, AMapSearch};