路線検索API
路線検索系APIを探しましたがフリーのものは存在しないようです。
各サイトを突っついてHTML解析するのもいいがそんなのはめんどくさい。
探してみると有料版だと経路検索ウエブサービスとしてこんなのがありました。
RailGo(http://www.railgo.jp/)
駅すぱあとだね。
.NET Framework 3.5で開発始めましたが、
あとからバージョン変えても余分なものが邪魔になるので
対象フレームワークを2.0で作り始めたほうがいいかも。
#ちなみに3.5で作ったので…
データ参照に
http://wstest.railgo.jp/Expservice06.asmx?WSDL
下記のパラメータサイズを大きくしないとレスポンスを受信できないかも。
maxBufferSize
maxReceivedMessageSize
ExpService06SoapClient
で
SearchStation や SearchCourse
ができます。
あっさり。
WebAPIって便利だよね。
それが簡単に使える.NET Frameworkって便利だよね〜
まあこんな感じ。
ExpService06SoapClient railgo = new ExpService06SoapClient(); Authentication authentication = new Authentication(); authentication.User = UserName; authentication.Password = PassWord; Station[] stations = railgo.SearchStation(authentication, 駅名, AreaType.Japan,StationType.RailRoad, 20080813); Navigation navigation = railgo.GetDefaultNavigation(authentication); Course[] courses = railgo.SearchCourse(authentication, searchstations, navigation);