Увеличить карту между двумя точками, используя Mapzen Android SDK

Используя Mapzen Android SDK, я нарисовал маршрут между двумя точками, используя широту и долготу на карте с mapData.addPolyline(markers, props); метод.

Теперь я хочу увеличить карту между этими двумя точками.

Масштабирование до одной точки может быть выполнено по методу ниже:

public void goToLandmark(Landmark landmark) {

    if (map == null) {
        return;
    }

    int duration = 2000; // Milliseconds

    // We use the position, zoom, tilt, and rotation of the Landmark to move the camera over time.
    // Different types of "easing" are available to make the transition smoother or sharper.
    map.setPositionEased(landmark.position, duration, MapController.EaseType.CUBIC);
    map.setZoomEased(landmark.zoom, duration, MapController.EaseType.LINEAR);
    map.setTiltEased(landmark.tilt, duration, MapController.EaseType.CUBIC);
    map.setRotationEased(landmark.rotation, duration, MapController.EaseType.CUBIC);
}

Пожалуйста, ведите меня, спасибо заранее.

0 ответов

Другие вопросы по тегам