WPF C1Maps VWorld 타일맵 2개 연동할 수 있도록 할 수 있을까요?
추천0 비추천 0
페이지 정보
작성자 이종범 작성일 2024-02-01 15:10 조회 43회 댓글 0건제품 버전 : WPF Edition 2023v1(784)
컨트롤 이름 : C1Maps
본문
관련링크
C1Maps의 Source를 입력하는 방식으로
V world의 WMTS 방식 타일맵을 연결 성공했습니다.
public class VWorldTileMap : MultiScaleTileSource { _uri = "https://api.vworld.kr/req/wmts/1.0.0/{0}/{1}/{2}/{3}/{4}.{5}"; _serverKey = "비공개"; public VworldTileMap() : Base(0x8000000, 0x8000000, 256, 256, 0) { } protected override void GetTileLayers(int tileLevel, int tilePositionX, int tilePositionY , IList<object> tileImageLayerSources) { if (tileLevel > 8) { string tile = string.Format(_uriFormat, _serverKey, "Satellite", tileLevel - 8 , tilePositionY, tilePositionX, "jpeg"); System.Diagnostics.Debug.WriteLine(tile); tileImageLayerSources.Add(new Uri(tile)); } } } -------------------------------------------------------- public MainWindow() { Maps.Source = new VWorldTileMap(); }
단일 타일맵의 연결은 C1Maps의 Source 속성에 등록하여 변경할 수 있으나
추가적인 타일맵을 Layer에 등록하고 싶어도 불가능한 상태입니다.
public MainWindow() { Maps.Source = new VworldTileMap(); //TileMap 2는 "Satellite" 대신 "Hybrid"를 쓰고, "jpeg" 대신 "png"를 씁니다. MapTilesLayer mapLayer = new(); mapLayer.Source = new VworldTileMap2(); Maps.Layers.Add(mapLayer); }
Exception은 RotateElement() 메소드 안에서 발생하며
입력된 elements가 null이라고 나옵니다.
어떻게 하면 C1Maps에 2개 이상의 타일맵을 Layer에 등록할 수 있을까요?
댓글목록
등록된 댓글이 없습니다.