- 高德地图配置 gradle dependencies 中添加地图的依赖:
- compile 'com.amap.api:map3d-native:latest.integration'
- compile 'com.amap.api:map3d:latest.integration'
- WXApplication 中添加插件注册
- WXSDKEngine.registerComponent("mapview", WXMapViewComponent.class);
- 高德地图配置 Podfile中添加地图的依赖:
- pod 'AMap3DMap'
- AppDelegate 中添加插件注册
- [WXSDKEngine registerComponent:@"mapview" withClass:NSClassFromString(@"WXMapViewComponent")];
- 添加mapview_demo.we文件,具体内容:
<template> <mapview style="width: 750;"></mapView> </template>
- index.we 中添加地图项:
- {name: 'component/mapview-demo', title: 'MapView'},
Weex具体介绍及安装请参见 Weex 官方地址