Placemark
당 LineString
개체 만 KMLViewer에서 처리 할 수 있습니다.
시도한 경로의 경우 Google은 '경로'장소 표시 (파일의 마지막 위치 표시)에 두 개의 LineString 객체를 반환합니다. KMLViewer는 두 번째 (마지막) LineString 세그먼트 만 표시합니다. 이외에도 (좋은 운동과 같은) 위치 표시 당 여러 개의 선 스트링 객체에 대한 지원을 추가 할 KMLViewer 코드를 업데이트
, 당신은이 두 가지 해결 방법을 시도 할 수 있습니다 :
한 유도 선에 두 개의 선 스트링 객체에서 좌표를 결합 . 변경 : 이것에
<Placemark>
<name>Route</name>
<description>some cdata stuff here</description>
<GeometryCollection>
<LineString><coordinates>coord1 … coordN</coordinates></LineString>
<LineString><coordinates>coordN+1 … coordK</coordinates></LineString>
</GeometryCollection>
<styleUrl>#roadStyle</styleUrl>
</Placemark>
:
<Placemark>
<name>Route</name>
<description>some cdata stuff here</description>
<GeometryCollection>
<LineString><coordinates>coord1 … coordN coordN+1 … coordK</coordinates></LineString>
</GeometryCollection>
<styleUrl>#roadStyle</styleUrl>
</Placemark>
은 위의 유일한 연속 있어야하는 경로 (선분)에 적합 할 수 있습니다.
다른 해결 방법은 (각 유도 선 하나를) 여러 장소 표시에 "경로"위치 표시를 분할하는 것입니다 :이와
<Placemark>
<name>Route A</name>
<description>some cdata stuff here</description>
<GeometryCollection>
<LineString><coordinates>coord1 … coordN</coordinates></LineString>
</GeometryCollection>
<styleUrl>#roadStyle</styleUrl>
</Placemark>
<Placemark>
<name>Route B</name>
<description>some cdata stuff here</description>
<GeometryCollection>
<LineString><coordinates>coordN+1 … coordK</coordinates></LineString>
</GeometryCollection>
<styleUrl>#roadStyle</styleUrl>
</Placemark>
한 가지 문제는 그 거리와 시간 정보가 일치하지 않습니다 들어있는 "설명" 분할 된 경로.
답변에 대한 Thx 좋은 도움이되었습니다! – aGit