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

[Bug]地图使用MapControl在iphone12 系统14.2.1上会报错

オープン
#532 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

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

評価

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

調査の方向性

まず、iOS 14.2.1 を実行している iPhone 上で、Google Maps の週次バージョンを使用して、提供された TypeScript の例を MapControl とともに再現し、その後 iOS 15 以降と比較します。MapControl のレンダリング経路と、Google Maps のコントロールコンテナとの相互作用を調査します。対象の iOS バージョンで、報告されたエラーなしにデモがレンダリングされれば完了です。

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

説明

google maps issue wontfix
Description

521726279207_ pic

Steps to Reproduce
import React, { useCallback, useMemo } from 'react'
import { useState, useEffect, FC, useRef, createRef, useContext, useReducer } from 'react'

import { APIProvider, useMap, Map, ControlPosition, RenderingType, MapControl, MapProps } from '@vis.gl/react-google-maps';
import './index.scss'
// import { getConfig } from '../../../../utils/google';
// const googleMapKey = getConfig.google.apiKey;
// const mapId = getConfig.google.mapId;

const googleMapKey = "testMapKey";
const mapId = "testId";

const Index: FC = () => {

    const mapProps: MapProps = {
        defaultCenter: {
            lat: 24.7136,
            lng: 46.6753,
        },
        disableDoubleClickZoom: false,
        mapId: mapId,
        mapTypeControl: false,
        minZoom: 5,
        maxZoom: 17,
        zoom: 10,
        style: {
            position: 'absolute',
            minHeight: "100vh",
            width: "100%"
        },
        renderingType: RenderingType.UNINITIALIZED,
    };
    return (
        <div className='index'>
            <APIProvider apiKey={googleMapKey}>
            <Map {...mapProps}>
                <MapControl position={ControlPosition.CENTER}>
                    <div style={{
                        background: 'red'
                    }}>
                        .. any component here will be added to the control-containers of the
                        google map instance ..
                    </div>
                </MapControl>
            </Map>
        </APIProvider>
        </div>
    )
}

export default Index

It's just the normal official demo code, without any additional rendering, and then the above error is reported. Systems equal to or higher than iOS 15 will not have this error.

(original text) 就是正常的官方demo代码,没有其他渲染,然后就报上面的错误了。大于等于ios 15的系统都不会有这个报错。
Environment
  • Library version: 最新
  • Google maps version: weekly
  • Browser and Version: 跟随ios 系统14.2.1的
  • OS: 14.2.1
Logs

No response

主要言語
TypeScript
スター
1.9k
フォーク
195
平均マージ
2日 18時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

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

visgl/react-google-maps のほかの issue

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

似ている issue

TypeScript の issue をもっと見る

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

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