Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript nativeEvent对象未出现在React Native中_Javascript_Reactjs_React Native_Google Maps_Maps - Fatal编程技术网

Javascript nativeEvent对象未出现在React Native中

Javascript nativeEvent对象未出现在React Native中,javascript,reactjs,react-native,google-maps,maps,Javascript,Reactjs,React Native,Google Maps,Maps,我正在尝试使用react native将简单地图集成到我的移动应用程序中,并希望获得用户在屏幕上点击的位置坐标。使用的库是以MapView作为组件的react本机地图 当我试图点击屏幕以获取点击区域的坐标时,如果我在控制台上记录onPress()事件,则nativeEvent对象不会出现。相反,我得到了“_nativeTag”:3,这在我搜索的许多教程和博客中都没有出现 请告知此查询的任何解决方案或替代方案 SyntheticEvent { "_dispatchInstan

我正在尝试使用react native将简单地图集成到我的移动应用程序中,并希望获得用户在屏幕上点击的位置坐标。使用的库是以MapView作为组件的react本机地图

当我试图点击屏幕以获取点击区域的坐标时,如果我在控制台上记录onPress()事件,则nativeEvent对象不会出现。相反,我得到了“_nativeTag”:3,这在我搜索的许多教程和博客中都没有出现

请告知此查询的任何解决方案或替代方案

   SyntheticEvent {
   "_dispatchInstances": FiberNode {
    "tag": 5,
    "key": null,
    "type": "AIRMap",
  },
  "_dispatchListeners": [Function selectLocationHandler],
  "_targetInst": FiberNode {
    "tag": 5,
    "key": null,
    "type": "AIRMap",
  },
  "bubbles": undefined,
  "cancelable": undefined,
  "currentTarget": ReactNativeFiberHostComponent {
    "_children": Array [],
    "_internalFiberInstanceHandleDEV": FiberNode {
      "tag": 5,
      "key": null,
      "type": "AIRMap",
    },
    *****"_nativeTag": 3,*****
    "viewConfig": Object {
      "Commands": Object {
        "animateCamera": 12,
        "animateToBearing": 4,
        "animateToCoordinate": 2,
        "animateToNavigation": 9,
        "animateToRegion": 1,
        "animateToViewingAngle": 3,
        "fitToCoordinates": 7,
        "fitToElements": 5,
        "fitToSuppliedMarkers": 6,
        "setCamera": 11,
        "setIndoorActiveLevelIndex": 10,
        "setMapBoundaries": 8,
      },