uiwjs / react-baidu-map

基于 React 封装的百度地图组件,支持 React Hook,帮助你轻松的接入地图到 React 项目中。
https://uiwjs.github.io/react-baidu-map
MIT License
225 stars 22 forks source link

setMapType requires an array #324

Open sasalem-c opened 9 months ago

sasalem-c commented 9 months ago

I noticed that setMapType function signature requires an array of MapType while it should be a single object. image

jaywcjlove commented 9 months ago

@sasalem-c What's the problem?

sasalem-c commented 9 months ago

As per the official Baidu documentation, setMapType has one parameter of MapType object not an array. Setting it to any array won't change map type.

jaywcjlove commented 9 months ago
image image

@sasalem-c The documentation does not explicitly identify the specific types of MapTypes, this is inferred from the documentation.