[Bug]地图使用MapControl在iphone12 系统14.2.1上会报错
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
Research direction
Start by reproducing the provided TypeScript example with MapControl on an iPhone running iOS 14.2.1 and the weekly Google Maps version, then compare it with iOS 15 or later. Inspect the MapControl rendering path and its interaction with the Google Maps control containers; done means the demo renders without the reported error on the affected iOS version.
Written by the indexing model from the issue text.
Description
Description
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
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 195
- Avg merge
- 6h 26m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from visgl/react-google-maps
-
Polygon / Polyline: edits after a controlled `paths` update never reach `onPathsChanged`Possibly taken @anubhavlal07 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
visgl/react-google-maps#1120 ·
Maintainers usually reply within 1 day
-
google maps issue
Difficulty 3/5 1-2 days Newbie friendliness 74/100
visgl/react-google-maps#1080 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs more info
Difficulty 3/5 1-2 days Newbie friendliness 45/100
visgl/react-google-maps#1039 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
visgl/react-google-maps#918 · 9 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
visgl/react-google-maps#905 ·
Maintainers usually reply within 1 day
All issues in visgl/react-google-maps
Similar issues
-
accessibility area:ci ci-test level:low priority:high type:test
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
skytuhua-org/Gen-V1#3132 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drmrd/vernacular#1238 ·
Maintainers usually reply within 1 day
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement migration-prioritized
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Hudson-Pufferfish/local-party-console#136 ·
Maintainers usually reply within 1 day
-
priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day