【问题标题】:How to upload the map legend in the web map closed rather than open when opening the web page?打开网页时如何上传关闭而不是打开的网页地图中的地图图例?
【发布时间】:2019-12-15 07:34:59
【问题描述】:

我有一个通过 ESRI Api 的地图图例。当我打开页面时,它会显示为打开

我该如何做到这一点,当我打开页面时它会像这样关闭

【问题讨论】:

    标签: javascript legend arcgis-js-api


    【解决方案1】:

    试试这个:

    const layerList = new LayerList({
              view: this.mapView,
              style: 'card',
              container: document.createElement('div'),
              listItemCreatedFunction: function(event: any) {
                setTimeout(function() {
                  const item = event.item;
     item.panel = {
                      content: 'legend',
                      open: false
                    };
                 });
              }
            });
    

    参考:esri-widgets-LayerList

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-06
      • 1970-01-01
      • 1970-01-01
      • 2021-12-29
      • 1970-01-01
      相关资源
      最近更新 更多