2

Arcgis开发者网页中,有一篇关于如何baseMap使用 custom添加新自定义的文章API url。看起来像这样:

require([
    "esri/basemaps",
    "esri/map",
    "dojo/domReady!"
  ], function (esriBasemaps, Map){
    esriBasemaps.delorme = {
      baseMapLayers: [{url: "https://services.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer"}
      ],
      thumbnailUrl: "https://www.example.com/images/thumbnail_2014-11-25_61051.png",
      title: "Delorme"
    };

    var map = new Map("ui-map", {
      basemap: "delorme",
      center: [-111.879655861, 40.571338776], // long, lat
      zoom: 13,
      sliderStyle: "small"
    });
});

现在我不明白如何使用react-arcgis来做同样的事情。似乎没有react-arcgis使用custom API url`` as BaseMap React 的内置方法but is there an option to do something similar in

this.props.map.basemap = 'streets-relief-vector';

而不是使用内置的底图字符串。

还创建了一个简单的CodeSandbox来测试它。

4

1 回答 1

0

您可以像这样设置底图

<Map mapProperties={{ basemap: "streets-relief-vector" }}>

于 2021-02-15T14:29:58.280 回答