function
createTopo() {
var
box = network.getElementBox();
var
geoDatas = [
{latitude: 39.91667, longitude: 116.41667, name:
"北京"
},
//北京
{latitude: 31.14, longitude:121.29, name:
"上海"
},
//上海
{latitude: 39.13333, longitude: 117.20000, name:
"天津"
},
//天津
{latitude: 22.20000, longitude:114.10000, name:
"香港"
},
//香港
{latitude: 23.16667, longitude: 113.23333, name:
"广州"
},
//广州
{latitude: 30.26667, longitude:120.20000, name:
"杭州"
},
//杭州
{latitude: 29.56667, longitude: 106.45000, name:
"重庆"
},
//重庆
{latitude: 26.08333, longitude:119.30000, name:
"福州"
},
//福州
{latitude: 36.03333, longitude: 103.73333, name:
"兰州"
},
//兰州
{latitude: 26.56667, longitude:106.71667, name:
"贵阳"
},
//贵阳
{latitude: 28.21667, longitude: 113.00000, name:
"长沙"
},
//长沙
{latitude: 32.05000, longitude:118.78333, name:
"南京"
},
//南京
{latitude: 28.68333, longitude: 115.90000, name:
"南昌"
},
//南昌
{latitude: 41.80000, longitude:123.38333, name:
"沈阳"
},
//沈阳
{latitude: 37.86667, longitude: 112.53333, name:
"太原"
},
//太原
{latitude: 30.66667, longitude:104.06667, name:
"成都"
},
//成都
{latitude: 29.60000, longitude: 91.00000, name:
"拉萨"
},
//拉萨
{latitude: 43.76667, longitude:87.68333, name:
"乌鲁木齐"
},
//乌鲁木齐
{latitude: 25.05000, longitude: 102.73333, name:
"昆明"
},
//昆明
{latitude: 34.26667, longitude:108.95000, name:
"西安"
},
//西安
{latitude: 36.56667, longitude: 101.75000, name:
"西宁"
},
//西宁
{latitude: 38.46667, longitude:106.26667, name:
"银川"
},
//银川
{latitude: 45.75000, longitude: 126.63333, name:
"哈尔滨"
},
//哈尔滨
{latitude: 43.88333, longitude:125.35000, name:
"长春"
},
//长春
{latitude: 30.51667, longitude: 114.31667, name:
"武汉"
},
//武汉
{latitude: 34.76667, longitude:113.65000, name:
"郑州"
},
//郑州
{latitude: 38.03333, longitude: 114.48333, name:
"石家庄"
},
//石家庄
{latitude: 20.01667, longitude:110.35000, name:
"海口"
},
//海口
{latitude: 22.20000, longitude: 113.50000, name:
"澳门"
},
//澳门
{latitude: 40.48, longitude: 111.41, name:
"呼和浩特"
},
//呼和浩特
{latitude: 22.48, longitude: 108.19, name:
"南宁"
},
//南宁
{latitude: 36.40, longitude: 117.00, name:
"济南"
},
//济南
{latitude: 31.52, longitude: 117.17, name:
"合肥"
},
//合肥
{latitude: 25.03 , longitude: 121.30, name:
"台北"
}
//台北
];
for
(
var
i = 0; i < geoDatas.length; i++) {
var
node =
new
twaver.Node();
node.setClient(GISSettings.GEOCOORDINATE,
new
twaver.gis.geometry.GeoCoordinate(geoDatas[i].latitude,geoDatas[i].longitude));
node.setImage(
"exponent"
);
node.setClient(
"name"
,geoDatas[i].name);
node.setClient(
"exponent"
,Math.floor(Math.random() * 200) + 20);
if
(node.getClient(
"exponent"
) < 50) {
node.setClient(
"color"
,
"green"
);
}
else
if
(node.getClient(
"exponent"
) >= 50 && node.getClient(
"exponent"
) < 100) {
node.setClient(
"color"
,
"#D6C621"
);
}
else
if
(node.getClient(
"exponent"
) >= 100 && node.getClient(
"exponent"
) < 150) {
node.setClient(
"color"
,
"#F5582E"
);
}
else
if
(node.getClient(
"exponent"
) >= 150 && node.getClient(
"exponent"
) <= 220) {
node.setClient(
"color"
,
"red"
);
}
box.add(node);
}
}