Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Map crashes when rendering Marker and Polyline

オープン
#5,910 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
react-native, typescript
領域
mobile-dev

調査の方向性

Start with the generated files node_modules/react-native-maps/lib/MapMarker.js and node_modules/react-native-maps/lib/MapPolyline.js from react-native-maps@1.20.1, then reproduce rendering a Marker and Polyline. Determine why the getNativeComponent declarations cause a crash and verify that both components render without the local patch.

索引モデルが issue の本文から書いたものです。

説明

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-maps@1.20.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-maps/lib/MapMarker.js b/node_modules/react-native-maps/lib/MapMarker.js
index 90b689e..d22177f 100644
--- a/node_modules/react-native-maps/lib/MapMarker.js
+++ b/node_modules/react-native-maps/lib/MapMarker.js
@@ -29,7 +29,7 @@ const react_native_1 = require("react-native");
 const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
 const MapMarkerNativeComponent_1 = require("./MapMarkerNativeComponent");

 class MapMarker extends React.Component {
-    getNativeComponent;
+    // getNativeComponent;
     getMapManagerCommand;
     getUIManagerCommand;
     static Animated;
diff --git a/node_modules/react-native-maps/lib/MapPolyline.js b/node_modules/react-native-maps/lib/MapPolyline.js
index b0efda7..260ff44 100644
--- a/node_modules/react-native-maps/lib/MapPolyline.js
+++ b/node_modules/react-native-maps/lib/MapPolyline.js
@@ -27,7 +27,7 @@ exports.MapPolyline = void 0;
 const React = __importStar(require("react"));
 const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));

 class MapPolyline extends React.Component {
-    getNativeComponent;
+    // getNativeComponent;
     getMapManagerCommand;
     getUIManagerCommand;
     polyline;

This issue body was partially generated by patch-package.

Map crash resolved after commenting out getNativeComponent.

主要言語
TypeScript
スター
16k
フォーク
5k
平均マージ
17時間 45分
マージ済み PR(30日)
2

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-native-maps/react-native-maps のほかの issue

react-native-maps/react-native-maps の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。