int childCount = mMapViewgetChildCount();
View zoom = null;
for (int i = 0; i < childCount; i++) {
View child = mMapViewgetChildAt(i);
if (child instanceof ZoomControls) {
zoom = child;
break;
}
}
zoomsetVisibility(ViewGONE);
// 隐藏比例尺控件
int count = mMapViewgetChildCount();
View scale = null;
for (int i = 0; i < count; i++) {
View child = mMapViewgetChildAt(i);
if (child instanceof ZoomControls) {
scale = child;
break;
}
}
scalesetVisibility(ViewGONE);
// 隐藏指南针
mUiSettings = mBaiduMapgetUiSettings();
mUiSettingssetCompassEnabled(true);
// 删除百度地图logo
mMapViewremoveViewAt(1);(1)你调用的天地图的服务,logo是清除不掉的
(2)矩形框总是距离鼠标点击的位置很远的原因 可能是天地图的坐标系和ArcGIS javascript API中的Map设置的坐标系不一致//驾车实例
var driving = new BMapDrivingRoute(map, {renderOptions:{map: map, autoViewport: true},
onPolylinesSet:function(routes) {
searchRoute = routes[0]getPolyline();//导航路线
mapaddOverlay(searchRoute);
},
onMarkersSet:function(routes) {
mapremoveOverlay(routes[0]marker); //删除起点
mapremoveOverlay(routes[1]marker);//删除终点
}
});
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)