• <menu id="w2i4a"></menu>
  • 首頁(yè) > 慧問(wèn) > 頻道

    Fusionmaps做中國(guó)地圖時(shí)自定義JavaScript函數(shù)不執(zhí)行[FusionMaps XT]

    發(fā)表于2019-05-10 回復(fù):0 查看:2307  |  

    我要用Fusionmaps做一個(gè)Flash中國(guó)地圖,想要實(shí)現(xiàn)一些功能,但是點(diǎn)擊地圖上的某個(gè)state的時(shí)候,點(diǎn)擊無(wú)效, 自定義JavaScript函數(shù)不執(zhí)行,該怎么做?

     

    html code

     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...ransitional.dtd">
    
    <html xmlns="http://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臺(tái)AC' color='FF0000'  link='JavaScript:myJS(\"安徽\(chéng)");'/><entity id='CN.SH' displayValue='上海' toolText='上海,53臺(tái)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個(gè)回答

    打破零回復(fù)...

    回復(fù)

    登錄 慧都網(wǎng)發(fā)表評(píng)論

    掃碼咨詢


    添加微信 立即咨詢

    電話咨詢

    客服熱線
    023-68661681

    TOP
    三级成人熟女影院,欧美午夜成人精品视频,亚洲国产成人乱色在线观看,色中色成人论坛 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();