<template>
    <mars2d-map
      :options="mapOptions"
      :url="configUrl"
      @onload="onload"
    ></mars2d-map>
  </template>
  
  <script>
  import Mars2dMap from "@/components/Mars2dMap/index";
  export default {
    data() {
      const basePathUrl = window.basePathUrl || "";
      return {
        configUrl: basePathUrl + "config/config.json",
        mapOptions: {
          // 配置文档：http://mars2d.cn/apidoc.html#Map
          copyright: false, //不显示厂商logo
        },
      };
    },
    components: { Mars2dMap },
    methods: {
      onload(map) {
        // 地图组件构造完成
      },
    },
  };
  </script>
  
  <style></style>
  