在Xamarin表格中,我将根据飞机的经度和纬度来说明飞机的路径。因此,为此,我想使用ArcGIS Esri显示具有特定级别细节的地图。
这是我的代码,但我无法设置详细信息级别以映射我应该做什么?
WebTiledLayer myBaseLayer = new WebTiledLayer("https://stamen-tiles-{subdomain}.a.ssl.fastly.net/watercolor/{level}/{col}/{row}.jpg");
Basemap layerBasemap = new Basemap(myBaseLayer);
Map myMap = new Map(layerBasemap);
MyMapView.Map = myMap;
以下作品有效,但由于某些限制,我不想使用它。
myMap = new Map(BasemapType.Imagery, Latitude, Longitude, 15);
MyMapView.Map = myMap;
答案 0 :(得分:0)
您可以初始化详细信息级别并将其添加到TileInfo
,然后在创建TileInfo
时将WebTiledLayer
作为参数传递:
private void Initialize()
{
LevelOfDetail item = new LevelOfDetail(1, resolution, scale);
List<LevelOfDetail> mainLevelOfDetail = new List<LevelOfDetail>();
mainLevelOfDetail.Add(item);
TileInfo mainTileInfo = new TileInfo(
DPI,
TileInfo.ImageFormat.PNG24,
mainLevelOfDetail,
mainOrigin,
mainOrigin.getSpatialReference(),
tileHeight,
tileWidth
);
// Create the layer from the URL and the subdomain list
WebTiledLayer webTiledLayer = new WebTiledLayer(
mainUrl,
SubDomain,
mainTileInfo,
mainEnvelope);
// Create a basemap from the layer
Basemap layerBasemap = new Basemap(myBaseLayer);
// Create a map to hold the basemap
Map myMap = new Map(layerBasemap);
// Add the map to the map view
MyMapView.Map = myMap;
}