0
최신 빙 API 업데이트로 변경된 사항을 찾을 수 없습니다. 나는 잠시 동안 내 앱을 업데이트하지 않았고 정규 표현식이 IRouteService 응답에서 더 이상 태그를 제거하지 않았습니다!Bing API IRouteService 응답에서 <VirtualEarth> 태그를 제거하십시오.
//Remove all Bing Maps tags around keywords.
Regex regex = new Regex("<[/a-zA-Z:]*>", RegexOptions.IgnoreCase | RegexOptions.Multiline);
textBlock1.Text = regex.Replace(directions.ToString(), string.Empty);
예기치 않은 결과 : 분명 뭔가가 너희들에 튀어 나와있는 경우
Leg #1
1. 15.034 Head <VirtualEarth:span class="heading">northeast</VirtualEarth:span>.
2. 8.4 Turn <VirtualEarth:TurnDir>left</VirtualEarth:TurnDir>
3. 0 You will reach your destination . The destination is on your left.
예상 결과
Leg #1
1. 15.034 Head northeast.
2. 8.4 Turn left
3. 0 You will reach your destination . The destination is on your left.
궁금 해서요! 보고 주셔서 감사합니다.
아마도''''와'''를 모두 포함하는 것이 가장 좋습니다. XML이 두 가지 방법으로 돌아 오는 것을 보았습니다. – Bobson
@Bobson : 동의! :) 그것을 다시 추가했습니다. –
Michael Bray와 Bobson에게 감사드립니다. – clamchoda