等値線 (Isoline) ルーティングリクエストを計算しています
等値線 (Isoline) は、ユーザーが取ることができる潜在的なルートを記述し、時間または距離によって、指定された開始位置を中心とするすべての方向の最大到達距離を示す多角形を提供します。
等値線 (Isoline) は、分離された複数のコンポーネントで構成されることがあります。 このサポートの使用例では、到達可能なエリアがフェリーリンクによって切断されます。
すべての島が別々のポリゴン ( コンポーネント ) として返されます。 これらのポリゴン間のフェリーリンクも、別個のポリラインジオメトリ ( 接続 ) として返されます。
フェリーを使用して到達可能な範囲は、複数のコンポーネント(接続の有無にかかわらず)として表示することも、 1 つのコンポーネントとして表示することもできます。
距離ベースの 等値線 (Isoline) を要求しています
距離ベースの 等値線 (Isoline) を計算するには、距離を範囲タイプとして指定します。 範囲はメートル単位で指定されます。 モードは最短でも最速でもかまいません。 常に最速ルートを走行し、最短ルートを走行することで、別のエリアに到達できます。 以下のリクエストでは、最短モードで、ベルリン中心部を中心に 30 km の 等値線 (Isoline) が計算されます。 この質問に答えてください。 30km 以下の距離を走行すると、どのエリアに到着できますか?
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(30000); // range in meters
isolinePlan.setRanges(ranges);
RouteOptions routeOptions = new RouteOptions();
routeOptions.setTransportMode(RouteOptions.TransportMode.CAR);
routeOptions.setRouteType(RouteOptions.Type.SHORTEST);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});

通常、ドライバーは最速のルートをドライブしたいと考えています。 この動作をシミュレートする 等値線 (Isoline) を計算して、指定した距離に制限することができます。 以下のリクエストでは、最速モードで、ベルリン中心部を中心に 30 km の 等値線 (Isoline) が計算されます。 この質問に答えてください。最速ルートを走行中に、 30km を超える走行で到達できるエリアは何ですか?
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(30000); // range in meters
isolinePlan.setRanges(ranges);
RouteOptions routeOptions = new RouteOptions();
routeOptions.setTransportMode(RouteOptions.TransportMode.CAR);
routeOptions.setRouteType(RouteOptions.Type.FASTEST);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});

時間ベースの 等値線 (Isoline) を要求しています
時間ベースの 等値線 (Isoline) を計算するには、時間を範囲タイプとして指定します。 範囲は秒単位で指定します。 以下のリクエストでは、ベルリン中心部を中心に 1 時間の 等値線 (Isoline) が計算されます。 これで、「特定のポジションから 1 時間以内に到達できる領域は何ですか?」という質問に答えます。
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(3600); // range in seconds
isolinePlan.setRanges(ranges);
isolinePlan.setRangeType(IsolinePlan.RangeType.TIME);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});

詳細レベルの設定
等値線 (Isoline) ポリゴンには多くのポイントが含まれている可能性がありますが、これはズームレベルの高い状態で表示する場合に問題になる可能性があります。
以下は、ベルリン中心部で計算された 30km 等値線 (Isoline) の例です。
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(30000); // range in meters
isolinePlan.setRanges(ranges);
IsolineOptions isolineOptions = new IsolineOptions();
isolineOptions.setIsolineQuality(IsolineOptions.IsolineQuality.BEST_QUALITY);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});

等値線 (Isoline) ポリゴンの詳細度を制御するには、 2 つの方法があります。 1 つ目は表示解像度です。 ビューの解像度を使用すると、ポリゴンの表示に必要な詳細レベルをクライアントが指定できます。 ピクセルあたりのメートル数で指定され、クライアントのズーム レベルおよび画面解像度を反映します。 等値線 (Isoline) サービスは、この値を使用して、バランスのとれた詳細レベルを検索します。
次の例では、同じ 等値線 (Isoline) リクエストのビュー解決パラメータを使用しています。
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(30000); // range in meters
isolinePlan.setRanges(ranges);
IsolineOptions isolineOptions = new IsolineOptions();
isolineOptions.setIsolineQuality(IsolineOptions.IsolineQuality.BALANCED);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});

2 つ目の方法は、 等値線 (Isoline) で許容される最大ポイント数を設定することです。 リクエストに数値が入力されると、サービスは自動的に詳細度を調整し、制限内に収まるように形状の単純化を実行します。
以下に、 max points パラメータを使用した同じ 等値線 (Isoline) 要求の例を示します。
IsolineRouter isolineRouter = new IsolineRouter();
isolineRouter.setConnectivity(IsolineRouter.Connectivity.ONLINE);
IsolinePlan isolinePlan = new IsolinePlan();
isolinePlan.setStart(new RouteWaypoint(new GeoCoordinate(52.4927, 13.4006)));
ArrayList<Integer> ranges = new ArrayList<>();
ranges.add(30000); // range in meters
isolinePlan.setRanges(ranges);
IsolineOptions isolineOptions = new IsolineOptions();
isolineOptions.setIsolineQuality(IsolineOptions.IsolineQuality.BEST_PERFORMANCE);
isolineRouter.calculateIsoline(isolinePlan, new IsolineRouter.Listener() {
@Override public void onCalculateIsolineFinished(List<Isoline> response,
IsolineError error) {
if (error != IsolineError.NONE) {
}
}
});
