除非窗口大小更改,否则amChart Javascript不会显示

时间:2014-10-02 21:46:04

标签: javascript html css amcharts

我无法得到"其中"部分在这个网站上工作。一旦用户调整窗口大小,地图就会显示。我已经尝试了几周试图解决问题而我根本不明白我能做些什么。我发现其他人在隐藏的内容中遇到的问题是amchart赢了工作......但做初始化或显示经常修复,但不适合我。

任何想法?

http://spshulem.com/indexlatest.html

有问题的代码:

<div class="pf">
    <div class="pf__item pf__item_collapsed">
        <div class="pf__trigger pf__trigger_collapsed">
            <span class="pf__trigger-text pf__trigger-text_collapsed" id="where">Where</span>
            <span class="pf__trigger-text pf__trigger-text_expanded"><span id="where">Where</span><span id="seen"> You've Seen Me.</span></span>
        </div>

        <div class="pf__full">
            <div class="pf__reducer">
                <p>While my hometown resides in Santa Barbara, California, I worked closely with over 10 startups in 5 months in San Francisco this year. I'm also a huge fan of travel, and have visited 18% of the world and counting so far .</p>

              <script type="text/javascript">
              // svg path for target icon
              var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z";

              var map = AmCharts.makeChart("mapdiv", {
                type: "map",
                pathToImages: "map/ammap/images/",

                imagesSettings: {
                    rollOverColor: "#CC0000",
                    rollOverScale: 3,
                    selectedScale: 3,
                    selectedColor: "#CC0000"
                },

                dataProvider: {
                    map: "worldLow",
                    images: [{
                        svgPath: targetSVG,
                        zoomLevel: 5,
                        scale: 0.3,
                        title: "Argentina",
                        latitude: -35.2092,
                        longitude: -65.3728
                    }, {
                        svgPath: targetSVG,
                        zoomLevel: 5,
                        scale: 0.3,
                        title: "Antarctica",
                        latitude: -59.9678,
                        longitude: -60.5766
                    }, {

                    ]
                },

                objectList: {
                    container: "listdiv"
                },
                showImagesInList: true
              });

                      </script>


                  <div>
                      <div id="listdiv" style="width:200px; overflow:auto; height:500px; float:right; background-color:#FFF;"></div>
                      <div id="mapdiv" style="margin-right:200px; background-color:#FFF; height: 500px;"></div>
                  </div>

0 个答案:

没有答案