/*
 * @Author: sjl
 * @Date: 2023-04-11 09:54:06
 * @Descripttion:
 */
(function () {
  // window.TFMapBaseUrl = 'http://localhost:4001';
  window.TFMapBaseUrl = 'http://106.12.170.138:4001';
  var cssExpr = new RegExp('\\.css');
  function inputLibs(url) {
    if (url) {
      if (cssExpr.test(url)) {
        document.writeln(`<link rel="stylesheet" href="${url}">`);
      } else {
        document.writeln(`<script type="text/javascript" src="${url}"></script>`);
      }
    }
  }
  //加载资源
  function load() {
    var libsConfig = [
      `${TFMapBaseUrl}/build/Cesium/Cesium.js`,
      `${TFMapBaseUrl}/build/Cesium/Widgets/widgets.css`,
      `${TFMapBaseUrl}/build/Libs/Turf.js`,
      `${TFMapBaseUrl}/build/Libs/echarts.js`,
      `${TFMapBaseUrl}/build/Libs/echarts-liquidfill.js`,
      `${TFMapBaseUrl}/build/TFMap/Assets/css/tf.css`,
      `${TFMapBaseUrl}/build/TFMap/TFMap.js`,
    ];
    libsConfig.map((i) => inputLibs(i));
  }
  load();
})();
