记录

 
 错误信息:
 invalid address or address of corrupt block 0x78db1e38 passed to dlfree
 原因分析:使用一个循环去访问一个方法时候产生该错误,推测可能因为访问的方法中需要去调用
           百度地图API。所以添加线程,并且做了延时,加上方法同步后,没有再报出该错。
 


        //设置缩放级别,默认级别为12
        MapStatusUpdate mapstatusUpdate = MapStatusUpdateFactory.zoomTo(19);;
        baiduMap.setMapStatus(mapstatusUpdate);
        
        //设置地图中心点
        MapStatusUpdate mapstatusUpdatePoint = MapStatusUpdateFactory.newLatLng(hmPos);
        baiduMap.setMapStatus(mapstatusUpdatePoint );
        
        //mapView.showScaleControl(false);//默认是true,显示缩放按钮
        //mapView.showZoomControls(false);//默认是true,显示比例尺

缩放尝试:
/*LatLngBounds.Builder builder = new LatLngBounds.Builder();
        for (Object stepBikeLine : bikingRouteResult.getRouteLines().get(0).getAllStep()){
            LatLng latLng = ((BikingRouteLine.BikingStep) stepBikeLine).getEntrance().getLocation();
            builder.include(latLng);
        }
        mBaidumap.setMapStatus(MapStatusUpdateFactory
                .newLatLngBounds(builder.build()));*/


/*            if (isFirstLoc) {// 定位完成将地图中心移至位置处
                    isFirstLoc = false;
                    LatLng ll = new LatLng(mLocationResult.latitude,
                            mLocationResult.longitude);
                    MapStatus.Builder builder = new MapStatus.Builder();
                    builder.target(ll).zoom(18.0f);
                    mBaidumap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build()));
                }*/

 /*
                if (mMapList == null || mMapList.isEmpty()) {
                    mRoutePlanBikePresenter.setSearchPOIProcess(flag);
                } else {
                    int countDoThing = -1;
                    for (final BikeLineStepBean bean : mMapList){
                        countDoThing++;
                        if (countDoThing == (mMapList.size() - 1)) {
                            new Thread(new Runnable() {
                                @Override
                                public void run() {
                                        mRoutePlanBikePresenter.setSearchNearbyProcess(flag, bean.getNodeLatlng(),
                                                RoutePlanBikePresenter.ENUM_NEAR_SEARCH.YES_NEAR_SEARCH);
                                }
                            }).start();


                        } else if(countDoThing == 0){
                            mRoutePlanBikePresenter.setSearchNearbyProcess(flag, bean.getNodeLatlng(),
                                    RoutePlanBikePresenter.ENUM_NEAR_SEARCH.YES_NEAR_FIRST);


                        } else {
                            new Thread(new Runnable() {
                                @Override
                                public void run() {
                                        mRoutePlanBikePresenter.setSearchNearbyProcess(flag, bean.getNodeLatlng(),
                                                RoutePlanBikePresenter.ENUM_NEAR_SEARCH.YES_NEAR_CONTINU);
                                }
                            }).start();
                        }
                    }
                }*/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值