在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来测试它。