谷歌地圖導航標誌
回答
Hi @ Mr.Black,感謝您的快速回復。對不起,這不是我要找的。我正在尋找儘可能多的關聯符號的駕駛路線。我會在我的問題中添加一個編輯來更加明確我的要求。 – ameyazing 2012-07-26 04:21:47
所以,你需要駕駛方向符號。是的,它也在那裏..你知道,許多類別下有許多圖標。 http://mapicons.nicolasmollet。com/markers/transportation/directions/directions/ – 2012-07-26 04:29:30
嗨,我很抱歉,但這仍然不是我要找的東西。我正在尋找可以接收的駕駛路線列表,例如輕微左轉,輕微右轉,左轉叉等。您的努力是值得讚賞的。 – ameyazing 2012-07-26 04:33:25
我沒發現什麼官,所以我做了一個快速C#程序提取關鍵短語。
輸出是here:
我的代碼是:
static void Main(string[] args)
{
ConcurrentDictionary<string,int> phrases = new ConcurrentDictionary<string,int>();
List<string> citiesOfUS = new List<string>()
{
"Chicago,IL",
"Los+Angeles,CA",
"Montgomery" + "," + "AL",
"Juneau" + "," + "AK",
"Phoenix" + "," + "AZ",
"Little+Rock" + "," + "AR",
"Sacramento" + "," + "CA",
"Denver" + "," + "CO",
"Hartford" + "," + "CT",
"Dover" + "," + "DE",
"Tallahassee" + "," + "FL",
"Atlanta" + "," + "GA",
"Honolulu" + "," + "HI",
"Boise" + "," + "ID",
"Springfield" + "," + "IL",
"Indianapolis" + "," + "IN",
"Des+Moines" + "," + "IA",
"Topeka" + "," + "KS",
"Frankfort" + "," + "KY",
"Baton+Rouge" + "," + "LA",
"Augusta" + "," + "ME",
"Annapolis" + "," + "MD",
"Boston" + "," + "MA",
"Lansing" + "," + "MI",
"St.+Paul" + "," + "MN",
"Jackson" + "," + "MS",
"Jefferson+City" + "," + "MO",
"Helena" + "," + "MT",
"Lincoln" + "," + "NE",
"Carson+City" + "," + "NV",
"Concord" + "," + "NH",
"Trenton" + "," + "NJ",
"Santa+Fe" + "," + "NM",
"Albany" + "," + "NY",
"Raleigh" + "," + "NC",
"Bismarck" + "," + "ND",
"Columbus" + "," + "OH",
"Oklahoma+City" + "," + "OK",
"Salem" + "," + "OR",
"Harrisburg" + "," + "PA",
"Providence" + "," + "RI",
"Columbia" + "," + "SC",
"Pierre" + "," + "SD",
"Nashville" + "," + "TN",
"Austin" + "," + "TX",
"Salt+Lake+City" + "," + "UT",
"Montpelier" + "," + "VT",
"Richmond" + "," + "VA",
"Olympia" + "," + "WA",
"Charleston" + "," + "WV",
"Madison" + "," + "WI",
"Cheyenne" + "," + "WY"
};
Parallel.ForEach(citiesOfUS, (string origin) =>
{
foreach (string destination in citiesOfUS)
{
string json = new WebClient().DownloadString("http://maps.googleapis.com/maps/api/directions/xml?origin=" + origin + "&destination=" + destination + "&sensor=false");
bool shouldExitLoop = false;
while (!shouldExitLoop)
{
int pos1 = json.IndexOf("<html_instructions>");
if (pos1 == -1) { shouldExitLoop = true; break; }
int pos2 = json.IndexOf("</html_instructions>");
if (pos2 == -1) { shouldExitLoop = true; break; }
string subString = json.Substring(pos1 + 19, pos2 - pos1 - 19);
json = json.Substring(pos2 + 20);
int posB1 = subString.IndexOf("<b");
while (posB1 != -1)
{
int posB2 = subString.IndexOf("</b");
string part1 = subString.Substring(0, posB1);
string part2 = subString.Substring(posB2 + 6);
subString = part1 + " SYM " + part2;
posB1 = subString.IndexOf("<b");
}
int posSpace = subString.IndexOf(">");
while (posSpace != -1)
{
string part1 = subString.Substring(0, posSpace);
string part2 = subString.Substring(posSpace + 4);
subString = part1 + part2;
posSpace = subString.IndexOf(">");
}
int posDiv1 = subString.IndexOf("<div");
while (posDiv1 != -1)
{
int posDiv2 = subString.IndexOf("</div");
string part1 = subString.Substring(0, posDiv1);
string part2 = subString.Substring(posDiv2 + 8);
subString = part1 + " SYM " + part2;
posDiv1 = subString.IndexOf("<div");
}
phrases.AddOrUpdate(subString, 1, (key, oldvalue) => oldvalue + 1);
}
}
});
string[] lines = phrases.Keys.ToArray();
Array.Sort(lines);
System.IO.File.WriteAllLines(@"C:\Users\Xantix\Desktop\WriteLines.txt", lines);
return;
}
基本上這些都是英文短語你想從每個省會城市走在了美國的每一個其他時。
任何大膽的標籤之間出現了替換單詞「SYM」,像左,右,街道名稱的,等
注:我刪除div的的html_instructions內部之間出現的東西,所以像「部分收費公路「和」正在建設中,直到SomeDate「失蹤。
隨意修改我的代碼在其他城市添加到列表或添加街道地址等
正如在他的回答@edb建議,文字是語言和區域有關。因爲,我不需要在我的項目中處理本地化,所以我編寫了一份英文說明列表。 @ edb的答案中可以使用相應的方向符號。
方向命令
- 採取<第n > <離開| right >
- 轉< Left |右> [< at ... > | <到... >]
- 出口駛入<...>
- 取[...]出口向<...>
- 在環島,<繼續直行|採取<第n >出口>
- 左轉駛入<...>
- 走匝道<上離開了< |右轉>到... |到... >
- 駛入<...>
- 保持<左|右邊>在叉[繼續朝...]
- 稍微<左|右> [到...]
- 夏普<離開|右>在<...>
- 使調頭在<...>
一些指令沒有關聯的象徵。
- 繼續到...
- 頭<迎...,華北,華南,... >
- 路過<...>
希望這是有益:)
- 1. 谷歌地圖導航
- 2. android谷歌地圖導航
- 3. 導航谷歌地圖
- 4. 谷歌地圖導航點
- 5. 谷歌地圖導航
- 6. 谷歌地圖和導航
- 7. Xcode谷歌地圖導航
- 8. Android谷歌地圖導航無意圖
- 9. 谷歌地圖和各地標誌
- 10. 抽屜式導航和谷歌地圖
- 11. 谷歌的地圖V6室內導航
- 12. 導航Android和谷歌地圖
- 13. 實時谷歌導航地圖
- 14. Android谷歌地圖API導航設施
- 15. 谷歌地圖V2和導航抽屜
- 16. 谷歌地圖導航選項爲ios
- 17. 谷歌地圖Android中的導航
- 18. 谷歌地圖導航儀的作用
- 19. 停止谷歌地圖導航程序
- 20. 谷歌地圖導航按鈕錯誤
- 21. 谷歌地圖導航 - 在Android應用程序中使用谷歌導航
- 22. 谷歌地圖V3標誌事件
- 23. 谷歌導航意圖
- 24. 谷歌地圖SDK iOS版:重新定位谷歌標誌
- 25. 我們如何修改谷歌標誌谷歌地圖
- 26. 導入標誌物的JavaScript API谷歌地圖
- 27. 谷歌地圖變化導航地圖控制器
- 28. 導航抽屜谷歌地圖V2,地圖封鎖抽屜
- 29. 谷歌地圖圖標
- 30. 操縱谷歌地球:平穩導航
教育局對,這是語言(和區域)的依賴,但是人們知道你需要一個英文單詞/短語列表,它們不在中的'b'標籤之間,如出現[here](http://maps.googleapis.com/maps/api/directions/xml?origin=Chicago,IL&destination=Los+Angeles,CA&waypoints=Joplin,MO|Oklahoma+City,OK&sensor=false)。 –
Xantix
2012-07-26 04:42:54
他謝謝。我沒有意識到地圖的意義。 @Xantix是的你是對的。我沒有把文本視爲語言依賴。不過,我編制了英文說明清單,可能對未來某人有所幫助。我應該在此主題中將其作爲附加答案發布嗎? – ameyazing 2012-07-27 04:16:41
看看我的答案,輸出鏈接包含大部分英語說明。 – Xantix 2012-07-27 18:16:40