Server : nginx/1.22.1
System : Linux iZwz9daxib3w3i063fw434Z 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : www ( 1000)
PHP Version : 7.2.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Directory :  /www/wwwroot/www.jkmold.com/statics/xingjingke/js/
Upload File :
Current Directory [ Writeable ] Root Directory [ Writeable ]


Current File : /www/wwwroot/www.jkmold.com/statics/xingjingke/js/map.js
// <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
// <script src="http://cache.amap.com/lbs/static/es5.min.js"></script>
// <script src="http://webapi.amap.com/maps?v=1.4.3&key=3c3d14e964d67536f254caa891d2a311"></script>
// <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>

//地图定位
  var map = new AMap.Map('container',{
    resizeEnable: true,
    zoom: 14,
    center: [113.87201,22.75872],
    lang: "en" 
  });
  var marker = new AMap.Marker({
    position: [113.87201,22.75872]
  });
  marker.setMap(map);
  marker.on('click',function(e){
    infowindow.open(map,e.target.getPosition());
  })
  AMap.plugin('AMap.AdvancedInfoWindow',function(){
     infowindow = new AMap.AdvancedInfoWindow({
     content:'<h1 style="font-size:14px;margin:10px;">深圳兴精科塑胶模具有限公司</h1>'+
             '<p style="font-size:12px;margin:10px;">地址:宝安区松岗街道东方社区东方大田洋南一路5号厂房</p>',
     offset: new AMap.Pixel(0, -30)
    });
    infowindow.open(map,[113.87201,22.75872]);
  });

  ///liteToolbar.js
  if (typeof map !== 'undefined') {
    map.on('complete', function() {
      if (location.href.indexOf('guide=1') !== -1) {
        map.setStatus({
          scrollWheel: false
        });
        if (location.href.indexOf('litebar=0') === -1) {
          map.plugin(["AMap.ToolBar"], function() {
            var options = {
              liteStyle: true
            }
            if (location.href.indexOf('litebar=1') !== -1) {
              options.position = 'LT';
              options.offset = new AMap.Pixel(10, 40);
            } else if (location.href.indexOf('litebar=2') !== -1) {
              options.position = 'RT';
              options.offset = new AMap.Pixel(20, 40);
            } else if (location.href.indexOf('litebar=3') !== -1) {
              options.position = 'LB';
            } else if (location.href.indexOf('litebar=4') !== -1) {
              options.position = 'RB';
            }
            map.addControl(new AMap.ToolBar(options));
          });
        }
      }
    });
  }