SlideShare a Scribd company logo
1 of 22
全国路線図API体験会
2015年11月21日
ヴァル研究所 コンテンツ開発部
今井信夫
1
アジェンダ
1. 全国路線図の概要説明 (10分)
2. ハンズオン形式によるAPI体験 (60分)
1. 環境準備
2. 路線図上の駅にピンを立てる
3. 路線図上の特定の路線を強調表示させる
4. 路線図上の駅に任意の写真や情報を載せる
5. 路線図上で選択した駅の情報を取得する
6. 路線図上の駅間を強調表示させる
3. 応用事例の説明 (15分)
1. ユーザーレイヤーの応用(停車駅案内)
2. 画面内の駅リスト表示
4. フリータイム (40分)
5. 質疑応答 (20分)
2
現在の路線図
3
現在の路線図へのニーズ
1. 全国を俯瞰できる路線図が欲しい
– 現状の路線図は、地域ごとに一枚絵で書かれ
ているため、全体を俯瞰するのが難しい。
2. 表現手段としての路線図がほしい
– 経路探索時の駅選択の入力補助には使用でき
るが、他の用途では使用できない。
4
そこで新しい路線図を作りました
1. 全国を俯瞰できる路線図
– 全国すべての鉄道路線をシームレスに見渡す
ことができる路線図
2. プログラマブル
– WEBサイト、スマホなどの各種アプリ
ケーションとの連携を容易に実現する
路線図操作用のJavaScriptAPI
5
全国路線図構成
6
Tile
Server
API
Server
全国路線図JavaScriptAPIの機能
1. 路線図を表示すること
2. 初期値設定(中心地指定、表示範囲指定)
3. デバック用コンソール表示
4. 駅をマーキングすること(標準マーカー、カスタマイズマーカー)
5. 路線色を変えること
6. 駅間色を変えること
7. 最寄り駅取得
8. ハッシュ機能(URLの末尾に座標情報を表示)
9. サイドメニュー、カスタマイズサイドメニュー
10.ユーザレイヤー(任意の駅に画像、テキスト、リンクを貼れる)
11.etc...
7
サンプル 1/4
8
路線を強調表示
サンプル 2/4
9
駅間を強調表示
サンプル 3/4
10
駅に写真を置く
サンプル 4/4
11
英語版も作成中(他の言語も今後追加予定)
ハンズオン形式によるAPI体験
12
環境準備
1. chromeなどの開発者コンソールのあるブラウザをご用意ください
2. zipファイルの内容確認
1. stations.csv 駅マスタ
2. lines.csv 路線マスタ
3. sections.csv 駅間マスタ
→大雑把ですが、駅間コードは路線コード+連番で構成されています
4. index.htmlと01~09のHTML
3. index.htmlをブラウザで開く
4. 「1.最小限のテンプレート」リンクを押下して、
路線図が表示されることを確認してください
最小限のテンプレート
13
1. コードの概要
01_basic.html
全国路線図の基本構造です。
最小限のテンプレートになります。
body onloadでinit関数を呼び、その中でRosenクラス
をイニシャライズしています。
このイニシャライザーの中で初期値の設定などを行い
ます。divタグに付けた、id(この場合はmap)とnew
Rosenの第一引数は合わせてください。
路線図上の駅にピンを立てる
14
1. コードの概要
02_station_marker.html
rosen.setStationMarker(22828);
→東京駅の駅コードは22828
2. 問題
1. 高円寺(22671)に標準マーカーを置いてください。
2. 渋谷(22715)にクリックイベント付きのマーカを置いてくだ
さい。
3. 品川(22709)にカスタムマーカーをおいてください。
路線図上の特定路線を強調表示させる
15
1. コードの概要
03_line_color.html
rosen.highlightLine(339);
→都営地下鉄三田線の路線コードが339
2. 問題
1. 有楽町線(334)を強調表示してください。
2. 東急東横線(314)を赤色(ff0000)で強調表示してください
。
路線図上の駅に任意の写真や情報を載せる
16
1. コードの概要
04_user_layer.html
rosen.setStationPopup(22828, ポップアップクラス);
→引数に駅コード+ポップアップクラス
■ポップアップクラスの種類
1. imagePopup
2. textPopup
3. htmlPopup
2. 問題
1. 六本木(23049)に画像を表示してください(imagePopupを使用)
2. 目黒(23018)にテキストを表示してください(textPopupを使用)
路線図上で選択した駅の情報を取得する
17
1. コードの概要
05_station_info.html
rosen.on("selectStation", function(data) {}
→クリックイベントの設置&コールバックのdataの中に
駅情報が入ってきます
2. 問題
クリックした駅にマーカーを設置して、テキストポップアッ
プでその駅名を表示してください
路線図上で駅間選択して路線を表示させる
18
1. コードの概要
06_highlight_section.html
rosen.highlightSections([3390190]);
→都営地下鉄三田線(神保町 - 水道橋)の駅間コードが3390190
2. 問題
1. 東西線(高田馬場 - 飯田橋)を強調表示してください。
[3310120,3310130,3310140,3310150]
2. 上記を赤色(ff0000)で強調表示してください。
クリックイベント設置
19
1. 駅クリックイベント
07_click_station.html
rosen.on("selectStation", function(data) {}
2. 路線クリックイベント
08_click_line.html
rosen.on("selectLine", function(data) {}
3. 駅間クリックイベント
09_click_section.html
rosen.on("selectSection", function(data) {}
休憩タイム
応用事例の説明(青山)
1. カスタムマーカーを使用した停車駅案内
2. 画面内の駅リスト表示
3. その他サンプル
21
本日はありがとうございました。
22

More Related Content

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

20151121開発体験会資料

Editor's Notes

  1. 皆様、お集まり頂きありがとうございます。 これより全国路線図APIのハンズオンを開催致します。 この路線図開発させて頂きました私、今井と、青山で進めさせて頂きたいと思います。
  2. このようなニーズがあがって参りました。
  3. 本日皆様に体感して頂く路線図ですが、
  4. 全国路線図の構成と致しましては、Leaflet.jsを継承し、rosen.jsというモノを作成しました。 開発者は、rosen.jsを使用して頂ければ、 裏の仕組みを気にせず、路線図への操作が簡単に可能です。 leafletが分かる方はLeafletを継承して、独自のものを作成することも可能です。 また弊社駅すぱあとWEBサービスAPIも必要に応じて呼び出し、その結果を路線図上に表示することも可能です。
  5. ユーザレイヤー(ポップアップ系)のバグ <!-- ユーザーレイヤーを使うときはこれも必要 --> <link rel="stylesheet" href="https://rawgit.com/Leaflet/Leaflet.label/master/dist/leaflet.label.css" /> <script src="https://rawgit.com/Leaflet/Leaflet.label/master/dist/leaflet.label-src.js"></script>