.tms를 사용하여 맵 서버에 연결하려면 맵 서버에 다음과 같은 기능이 있어야 합니다.
.tms 파일은 텍스트 편집기에서 만들 수 있는 간단한 텍스트 파일입니다.
텍스트 편집기를 엽니다.
다음 XML을 복사하여 텍스트 편집기에 붙여 넣습니다.
<?xml version="1.0" encoding="utf-8"?>
<mapsource inline="<boolean>" version="8.1">
<connection class="OpenStreetMap" port="80" server="<server-url>" url-format="<url-format>" />
<layers>
<layer display-name='Base' name='base' show-ui='false' type='features' request-string='/' />
</layers>
</mapsource>
이 문서의 TMS 파일의 필수 변수 섹션에 있는 설명에 따라 <boolean>, <server-url> 및 <url-format> 변수를 바꿉니다.
TMS 파일을 .tms 확장명으로 Tableau Desktop 또는 Tableau Server의 맵 원본 폴더에 저장합니다.
맵 원본 폴더의 기본 위치는 다음과 같습니다.
Mac의 Tableau Desktop - /Users/<사용자>/Documents/내 Tableau 리포지토리/맵 원본
Windows의 Tableau Desktop - C:\Users\<사용자>\Documents\내 Tableau 리포지토리\맵 원본
Tableau Server - C:\Program Files\Tableau\Tableau Server\<버전>\vizqlserver\mapsources
Tableau Desktop을 엽니다.
위치 정보가 포함되어 있는 통합 문서에 연결합니다.
맵 > 배경 맵을 선택한 다음 TMS 파일에 구성되어 있는 맵 서버에서 배경 맵을 선택합니다.
(선택 사항) TMS 파일을 Tableau Server의 맵 원본 폴더에 추가한 경우 통합 문서를 Tableau Server에 게시하면 TMS 파일이 구성되어 있는 배경 맵이 표시됩니다.
XML에서 다음 변수만 변경할 수 있습니다.
<boolean>: <boolean>을 true 또는 false 값으로 바꿉니다.
true 값을 사용하면 Tableau Desktop이 TMS 파일에 지정된 구성을 통합 문서에 저장할 수 있도록 허용됩니다. 통합 문서를 Tableau Cloud 또는 Tableau Public에 게시할 예정이라면 이 값을 사용합니다.false 값을 사용하면 Tableau Desktop 또는 Tableau Server가 맵 서버의 맵을 표시하기 위해 맵 원본 폴더에 저장되어 있는 TMS 파일에 액세스해야 합니다.<server-url>: <server-url>을 맵 서버의 URL로 바꿉니다.<url-format>: <url-format>을 맵 서버에 필요한 추가적인 URL 코드 조각으로 바꿉니다. 여기에는 다음 태그가 포함될 수 있습니다.
{Z}: {Z} 태그는 zoom 수준을 나타냅니다. zoom 수준 0은 맵 타일 하나에 전세계를 표시합니다. TMS는 최대 16개 수준까지 맵 타일을 가져옵니다.{X} 및 {Y}: {X} 및 {Y} 태그는 맵 타일 좌표를 나타냅니다. 맵 타일에 대한 자세한 내용은 다음 웹 페이지를 참조하십시오.
OpenStreetMaps에서 제공하는 샘플 맵 서버에 연결한다고 가정합니다. 이 경우 TMS 파일은 다음과 같습니다.
<?xml version="1.0" encoding="utf-8"?>
<mapsource inline="true" version="8.1">
<connection class="OpenStreetMap" port="80" server="http://a.tile.openstreetmap.org" url-format="/{Z}/{X}/{Y}.png" />
<layers>
<layer display-name='Base' name='base' show-ui='false' type='features' request-string='/' />
</layers>
</mapsource>
API 키의 특수 처리와 맵 타일의 확장, 축소 및 투명도 제어를 위해 고급 TMS 파일 형식을 사용할 수 있습니다.
참고: 맵 원본 폴더에서 Tableau Desktop 및 Tableau Server에 포함된 TMS 파일을 찾을 수 있습니다. 이러한 파일에 구성되어 있는 설정은 다른 맵 서버에 대한 연결에는 지원되지 않습니다.
맵 서버가 서버 URL에서 API 키를 요구하는 경우 connection 요소의 <url-format> 섹션에서 {K} 태그를 사용할 수 있습니다.
<url-format> 문자열에서 {K} 태그를 사용하고 username 특성에 API 키를 배치하는 방식으로 API 키를 문자열에서 분리할 수도 있습니다.
다음 예제에서는 {K} 태그와 username 특성에서 API 키를 사용하는 방법을 보여 줍니다.
<?xml version="1.0" encoding="utf-8"?>
<mapsource inline="true" version="8.1">
<connection class="OpenStreetMap" port="80" server="http://a.tile.mapbox.com" url-format="/v4/base.mapbox-streets+bg-e8e0d8_landuse_water_buildings_streets/{Z}/{X}/{Y}.png?access_token={K}" username="<your-api-key>"/>
<layers>
<layer display-name='Base' name='base' show-ui='false' type='features' request-string='/' />
</layers>
</mapsource>
기본적으로 Tableau는 맵 서버가 제공하는 맵 타일을 가져온 다음 데이터와 일치하도록 맵 타일을 축소합니다. 맵 타일이 표시되는 방법을 세부적으로 제어해야 한다면 connection 요소에 확장 상한인 max-stretch와 축소 하한인 min-shrink 특성을 설정할 수 있습니다.
확장 상한과 축소 하한을 1로 설정하면 Tableau가 맵 타일을 확장하거나 축소하지 않습니다. 대신 Tableau는 타일에 맞게 맵을 zoom합니다. 확장과 축소도 가능하면서 zoom에 따라 약간의 스냅도 할 수 있도록 확장 상한과 축소 하한 특성을 1에 가까운 값으로 설정할 수도 있습니다.
다음 예제에서는 max-stretch 및 min-shrink 특성을 사용하는 방법을 보여 줍니다.
<?xml version="1.0" encoding="utf-8"?>
<mapsource inline="true" version="8.1">
<connection class="OpenStreetMap" port="80" server="http://a.tile.openstreetmap.org" url-format="/{Z}/{X}/{Y}.png" max-stretch="1.2" min-shrink="0.667"/>
<layers>
<layer display-name='Base' name='base' show-ui='false' type='features' request-string='/' />
</layers>
</mapsource>
기본적으로 Tableau는 데이터가 두드려져 보이도록 맵 서버에서 받은 맵 타일을 약간 투명하게 만듭니다. 맵 타일의 투명도 수준을 조정하려면 루트 요소의 닫는 태그인 </mapsource> 바로 위에 다음 XML 섹션을 추가합니다. 투명도 값은 0.0에서 1.0 사이의 원하는 숫자로 변경할 수 있습니다.
다음 XML에서는 루트 요소의 닫는 태그인 </mapsource> 앞에 배치할 수 있는 항목의 예를 보여 줍니다.
<mapsource-defaults version="8.1">
<style>
<style-rule element="map">
<format attr="washout" value="0.0"/>
</style-rule>
</style>
</mapsource-defaults>
001458061

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.