-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何显示默认地图类型 #139
Comments
<MapTypeControl defaultType={1} /> |
我看 2.0 没有这个 API 你可以看官方API @evanyangg |
@evanyangg 示例:https://codesandbox.io/embed/react-amap-demo-139-sj5z6?fontsize=14&hidenavigation=1&theme=dark import React from "react";
import ReactDOM from "react-dom";
import { Map, APILoader } from "@uiw/react-amap";
function MapDome() {
return <Map layers={[new AMap.TileLayer.Satellite()]} />;
}
const Demo = () => (
<div style={{ width: "100%", height: "300px" }}>
<APILoader akay="a7a90e05a37d3f6bf76d4a9032fc9129">
<MapDome />
</APILoader>
</div>
);
ReactDOM.render(<Demo />, document.getElementById("container")); |
感谢感谢🙏🙏
但是好像没有生效 |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我这边想默认就显示卫星类型的地图
官网是这样的
但是我在这个项目里面只看到了AMap.MapType插件, 必须显示一个面板然后切换吗?
The text was updated successfully, but these errors were encountered: