当前位置: 首页>>代码示例>>Java>>正文


Java LatLngBounds.Builder方法代码示例

本文整理汇总了Java中com.amap.api.maps.model.LatLngBounds.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java LatLngBounds.Builder方法的具体用法?Java LatLngBounds.Builder怎么用?Java LatLngBounds.Builder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amap.api.maps.model.LatLngBounds的用法示例。


在下文中一共展示了LatLngBounds.Builder方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLatLngBounds

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
/**
 * 根据自定义内容获取缩放bounds
 */
private LatLngBounds getLatLngBounds( List<RankEntity> RankEntitiesList) {
    LatLngBounds.Builder b = LatLngBounds.builder();
    for (int i = 0; i < RankEntitiesList.size(); i++) {
        LatLng p = RankEntitiesList.get(i).getPosition();
        b.include(p);
    }
    return b.build();
}
 
开发者ID:amap-demo,项目名称:android-collision-marker,代码行数:12,代码来源:RankerOverlay.java

示例2: onClick

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
@Override
public void onClick(Marker marker, List<ClusterItem> clusterItems) {
    LatLngBounds.Builder builder = new LatLngBounds.Builder();
    for (ClusterItem clusterItem : clusterItems) {
        builder.include(clusterItem.getPosition());
    }
    LatLngBounds latLngBounds = builder.build();
    mAMap.animateCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds, 0));
}
 
开发者ID:xiaogu-space,项目名称:android-cluster-marker-master,代码行数:10,代码来源:MainActivity.java

示例3: onClick

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
@Override
public void onClick(Marker marker, List<ClusterItem> clusterItems) {

    LatLngBounds.Builder builder = new LatLngBounds.Builder();
    for (ClusterItem clusterItem : clusterItems) {
        builder.include(clusterItem.getPosition());
    }
    LatLngBounds latLngBounds = builder.build();
    mAMap.animateCamera(CameraUpdateFactory.newLatLngBounds(latLngBounds, 0)
    );
}
 
开发者ID:amap-demo,项目名称:android-cluster-marker,代码行数:12,代码来源:MainActivity.java

示例4: getBounds

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
private LatLngBounds getBounds() {
	LatLngBounds.Builder b = LatLngBounds.builder();
	if (mOriginLatLngList == null) {
		return b.build();
	}
	for (int i = 0; i < mOriginLatLngList.size(); i++) {
		b.include(mOriginLatLngList.get(i));
	}
	return b.build();

}
 
开发者ID:amapapi,项目名称:RecordPath3D,代码行数:12,代码来源:RecordShowActivity.java

示例5: getBoundsOfInputPoints

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
LatLngBounds getBoundsOfInputPoints() {
	if (boundsOfInputPoints == null) {
		LatLngBounds.Builder builder = LatLngBounds.builder();
		for (InputPoint inputPoint : pointsInClusterList) {
			builder.include(inputPoint.getMapPosition());
		}
		boundsOfInputPoints = builder.build();
	}
	return boundsOfInputPoints;
}
 
开发者ID:mikezit,项目名称:cluster-amap,代码行数:11,代码来源:ClusterPoint.java

示例6: getLatLngBounds

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
public LatLngBounds getLatLngBounds() {
    LatLngBounds.Builder b = LatLngBounds.builder();
    b.include(new LatLng(startPoint.latitude,startPoint.longitude));
    b.include(new LatLng(endPoint.latitude,endPoint.longitude));
    return b.build();
}
 
开发者ID:yimiaoxiehou,项目名称:ZhuHaiBusApplication,代码行数:7,代码来源:RouteOverlay.java

示例7: move

import com.amap.api.maps.model.LatLngBounds; //导入方法依赖的package包/类
public void move(View view) {

        addPolylineInPlayGround();

        List<LatLng> points = readLatLngs();
        LatLngBounds.Builder b = LatLngBounds.builder();
        for (int i = 0; i < points.size(); i++) {
            b.include(points.get(i));
        }
        LatLngBounds bounds = b.build();
        aMap.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100));

        smoothMarker = new SmoothMarker(aMap);
        smoothMarker.setDescriptor(BitmapDescriptorFactory.fromResource(R.drawable.car));

        LatLng drivePoint = points.get(0);
        Pair<Integer, LatLng> pair = PointsUtil.calShortestDistancePoint(points, drivePoint);
        points.set(pair.first, drivePoint);
        List<LatLng> subList = points.subList(pair.first, points.size());

        smoothMarker.setPoints(subList);
        smoothMarker.setSpeed(20);

        aMap.setInfoWindowAdapter(infoWindowAdapter);
        smoothMarker.setMoveListener(new SmoothMarker.SmoothMarkerMoveListener() {
            @Override
            public void move(double remainDistance, double totalDistance) {
                if (infoWindowLayout != null && title != null) {
                    title.setText("距离终点还有: " + (int) remainDistance + "米\n" + "完成百分比:" + (int)
                            ((totalDistance - remainDistance) / totalDistance * 100) + "%");
                }
            }

            @Override
            public void stop() {
                Toast.makeText(MainActivity.this, "动画停止", Toast.LENGTH_SHORT).show();
                Log.d("MainActivity", smoothMarker.getPosition().toString());
            }

        });
        smoothMarker.getMarker().showInfoWindow();

        smoothMarker.startSmoothMove();


    }
 
开发者ID:facexxyz,项目名称:SmoothMove,代码行数:47,代码来源:MainActivity.java


注:本文中的com.amap.api.maps.model.LatLngBounds.Builder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。