아니요, 동일한지도에 두 개의 영역으로 구성된지도를 만들 수 없습니다.
이유는 Google geocharts가 보여주는 지역의 SVG 이미지에 의존하기 때문에 API 내에 SVG지도가 제한되어 있기 때문에 (일부 국가에서는 resolution: 'provinces'
으로 작동하지 않는 이유가 여기에 해당됩니다).
그러나 두 지역의 데이터로 데이터 테이블을 만들 수 있으며 동일한 데이터 테이블을 사용하여 두 개의 별도지도 (각 지역 중 하나)를 채울 수 있습니다. 예를 들어
:
<!--
You are free to copy and use this sample in accordance with the terms of the
Apache license (http://www.apache.org/licenses/LICENSE-2.0.html)
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Google Visualization API Sample</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('visualization', '1', {packages: ['geochart']});
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['Country', 'Popularity'],
['Germany', 200],
['United States', 300],
['Brazil', 400],
['Canada', 500],
['France', 600],
['RU', 700]
]);
// Draw First Chart
var geochart = new google.visualization.GeoChart(
document.getElementById('visualization'));
geochart.draw(data, {width: 556, height: 347, region: '019', resolution: 'countries'});
// Draw Second Chart
var geochart2 = new google.visualization.GeoChart(
document.getElementById('visualization2'));
geochart2.draw(data, {width: 556, height: 347, region: '150', resolution: 'countries'});
}
google.setOnLoadCallback(drawVisualization);
</script>
</head>
<body style="font-family: Arial;border: 0 none;">
<div id="visualization"></div>
<div id="visualization2"></div>
</body>
</html>
는 또한 "아메리카"지역 (019)은 세계지도로 높이, 실제로 "세계"를 통해 당신에게 공간을 저장하지 않습니다. 캐나다 나 멕시코에 마커가없는 경우 북미 또는 '미국'을 사용할 것을 제안합니다.