<!DOCTYPE html><html><head><title>MapBindingShapefilePolylines</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample"><igc-geographic-mapid="geoMap"width="100%"height="100%"></igc-geographic-map></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
Like this sample? Get access to our complete Ignite UI for Web Components toolkit and start building your own apps in minutes. Download it for free.
지리 공간 데이터 항목에 대한 데이터 테이블이 포함된 모양 데이터베이스 파일(.dbf)에 Uri를 지정합니다.
두 소스 속성이 모두 null이 아닌 값으로 설정된 경우 IgcShapeDataSource 개체의 ImportAsync 메서드가 호출되어 그 대가로 모양 파일을 가져오고 읽고 마지막으로 변환을 수행합니다. 이 작업이 완료되면 IgcShapeDataSource가 IgcShapefileRecord 객체로 채워지고 모양 파일에서 지리 공간 데이터를 로드하고 변환하는 프로세스가 완료되었음을 알리기 위해 ImportCompleted 이벤트가 발생합니다.
Loading Shapefiles
다음 코드는 전 세계 주요 도시의 위치가 포함된 모양 파일을 로드하기 위해 IgcShapeDataSource 개체의 인스턴스를 만듭니다. 또한 데이터를 지도 구성 요소에 바인딩하기 위한 전제 조건으로 ImportCompleted 이벤트를 처리하는 방법도 보여줍니다.
Binding Shapefiles
지도 구성 요소에서 Geographic Series는 모양 파일에서 로드된 지리 공간 데이터를 표시하는 데 사용됩니다. 모든 유형의 Geographic Series에는 개체 배열에 바인딩될 수 있는 ItemsSource 속성이 있습니다. IgcShapeDataSource는 IgcShapefileRecord 개체 목록을 포함하므로 이러한 배열의 예입니다.