彩票走势图

彩票走势图 > 慧问 > 频道

Fusionmaps做中国地图时自定义JavaScript函数不执行[FusionMaps XT]

发表于2019-05-10 回复:0 查看:2371  |  

我要用Fusionmaps做一个Flash中国地图,想要实现一些功能,但是点击地图上的某个state的时候,点击无效, 自定义JavaScript函数不执行,该怎么做?

 

html code

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "//www.w3.org/TR...ransitional.dtd">

<html xmlns="//www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript" src="FusionCharts.js"></script>
<title>my map</title>
<script language="JavaScript">
function myJS(myVar){
  window.alert(myVar);
}

function setMap(){
 var map = new FusionCharts('FCMap_China2.swf', "Map1Id", "800", "540", "0", "0");
map.setDataXML("<map showShadow='0' showBevel='1' showMarkerLabels='1'  borderColor='00324A' fillColor='F0FAFF' hoverColor='C0D2F8' baseFont='Verdana' baseFontSize='12' markerBorderColor='000000' markerBgColor='FF5904' markerRadius='6' legendPosition='bottom' useHoverColor='1' showMarkerToolTip='1' showCanvasBorder='1' canvasBorderColor='f1f1f1' canvasBorderThickness='2' borderColor='00324A'  hoverColor='C0D2F8'>       <data>   <entity id='CN.AH' displayValue='安徽' toolText='安徽,53台AC' color='FF0000'  link='JavaScript:myJS(\"安徽\");'/><entity id='CN.SH' displayValue='上海' toolText='上海,53台AC' color='FF0000'  link='JavaScript:myJS(\"上海\");'/> </data>  </map>");
    map.render("mapDiv");
}
</script>
</head>
<body onload="setMap()">
<div id="mapDiv" align="center" style="margin:2px;">Test Map</div>
</body>
</html>

 

0个回答

打破零回复...

回复

登录 慧都网发表评论

扫码咨询


添加微信 立即咨询

电话咨询

客服热线
023-68661681

TOP