interface YMKRouteOverlay
緯度経度指定によるルート検索およびルート表示を行うOverlayクラスです。
タスク
初期化
情報取得
distanceプロパティーtimeプロパティーnodeInfoCountプロパティーgetRouteNodeInfoWithIndex
デリゲートの取得・設定
delegateプロパティー
条件設定
検索
タイトル属性の取得、設定
プロパティー
distance
ルートの距離をメートルで返します。
@property CGFloat distance
time
ルートの移動にかかる時間を分で返します。
@property CGFloat time
nodeInfoCount
経由点の数を返します。
@property (nonatomic, readonly) NSUInteger nodeInfoCount
delegate
YMKRouteOverlayDelegateを設定します。
@property (nonatomic, assign) id <YMKRouteOverlayDelegate> delegate
メソッド
initWithAppid:
YMKRouteOverlayの初期化を行います。
-(id)initWithAppid:(NSString *)appid
| 引数 | 説明 |
|---|---|
| appid | アプリケーションID |
アプリケーションIDについての詳細は、こちらをご覧ください。
setRouteStartPos:withGoalPos:withTraffic:
検索したいルートの出発地、目的地、移動手段の設定を行います。
-(void)setRouteStartPos:(CLLocationCoordinate2D)sp withGoalPos:(CLLocationCoordinate2D)gp withTraffic:(int)traffic
| 引数 | 説明 |
|---|---|
| sp | 出発地の緯度経度 |
| gp | 目的地の緯度経度 |
| traffic | 移動手段(車:TRAFFIC_CAR 徒歩:TRAFFIC_WALK) |
search
ルート検索を開始します。検索完了後はYMKRouteOverlayDelegateにイベントが返されます。
-(BOOL)search
| 戻り値 |
|---|
| YES:成功 NO:失敗 |
getRouteNodeInfoWithIndex
出発地からi番目の経由点情報(案内ポイント)を返します。
-(YMKRouteNodeInfo*)getRouteNodeInfoWithIndex:(int)index
| 引数 | 説明 |
|---|---|
| index | 経由点番号 |
| 戻り値 | 経由点情報(案内ポイント) |
setStartTitle:
出発地ピンの吹き出しタイトルの設定を行います。
-(void)setStartTitle:(NSString*)title
| 引数 | 説明 |
|---|---|
| title | 吹き出しタイトル |
setGoalTitle:
目的地ピンの吹き出しタイトルの設定を行います。
-(void)setGoalTitle:(NSString*)title
| 引数 | 説明 |
|---|---|
| title | 吹き出しタイトル |