![arcgis中引入bingmap_第1页](http://file3.renrendoc.com/fileroot_temp3/2022-1/22/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff1.gif)
![arcgis中引入bingmap_第2页](http://file3.renrendoc.com/fileroot_temp3/2022-1/22/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff2.gif)
![arcgis中引入bingmap_第3页](http://file3.renrendoc.com/fileroot_temp3/2022-1/22/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff3.gif)
![arcgis中引入bingmap_第4页](http://file3.renrendoc.com/fileroot_temp3/2022-1/22/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff4.gif)
![arcgis中引入bingmap_第5页](http://file3.renrendoc.com/fileroot_temp3/2022-1/22/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff/8c4df608-fb9e-48c8-b2b7-d47adad7d3ff5.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、arcgis 中引入 bingmaparcgis中引入 bingmap分类: GIS 2011-05-12 12:05 566 人阅读 评论 (0) 收藏 举报 前期:有 KEY 码。通过注册获取(1)加入 bingmap,因为是 3857 坐标系统。Spatial Reference: 102100 (3857) 102100 WGS_1984_Web_Mercator_Auxiliary_Sphere所以要作为最底图加入即可2)叠加 tile 的类:using ESRI.ArcGIS.Client;using ESRI.ArcGIS.Client.Geometry;using System
2、.Windows;using System;namespace Diligentpigpublic class ClientDynamicTileMapServiceLayer :TiledMapServiceLayerpublic bool iscansee = true;public static readonly DependencyPropertyUrlProperty = DependencyProperty.Register("Url", typeof(string), typeof(ClientDynamicTileMapServiceLayer), new
3、PropertyMetadata(newPropertyChangedCallback(ClientDynamicTileMapServiceLayer.OnUrlPropertyChanged);public string Urlget return (string)GetValue(UrlProperty); set SetValue(UrlProperty, value); public static readonly DependencyPropertyDisableClientCacheProperty =DependencyProperty.Register("Disab
4、leClientCache", typeof(bool), typeof(ClientDynamicTileMapServiceLayer), newPropertyMetadata(newPropertyChangedCallback(ClientDynamicTileMapServiceLayer.OnDisableClientCachePropertyChanged);public bool DisableClientCacheget return(bool)GetValue(DisableClientCacheProperty); set SetValue(DisableCl
5、ientCacheProperty,value); private int _visibleLayers;/ <summary>/ Set the visible layers ofDynamicTileMapServiceLayer by an int array which starts from 0./ If sets to NULL, all sublayers will be visible./ </summary>public int VisibleLayersget return _visibleLayers; set_vi
6、sibleLayers = value;if (this.IsInitialized)this.IsInitialized = false;this.InitializationFailure = null;this.Refresh();this.Initialize();private const double cornerCoordinate =20037508.3427892;public override void Initialize()this.FullExtent = newESRI.ArcGIS.Client.Geometry.Envelope(-20037508.342789
7、2, -20037508.3427892, 20037508.3427892, 20037508.3427892)SpatialReference = newSpatialReference(102100);/ This layer's spatial referencethis.SpatialReference = newSpatialReference(102100);/ Set up tile information. Each tile is 256x256px,19 levels.this.TileInfo = new TileInfo()Height = 256,Width
8、 = 256,Origin = new MapPoint(-cornerCoordinate,cornerCoordinate) SpatialReference = newESRI.ArcGIS.Client.Geometry.SpatialReference(102100) ,Lods = new Lod19;/ Set the resolutions for each level. Each level ishalf the resolution of the previous one.double resolution = cornerCoordinate * 2 / 256;for
9、(int i = 0; i < TileInfo.Lods.Length; i+)TileInfo.Lodsi = new Lod() Resolution =resolution ;resolution /= 2;/ Call base initialize to raise the initializationeventbase.Initialize();public override string GetTileUrl(int level, int row, intcol)if (iscansee)string baseUrl ="0/export?udpi=96
10、&transparent=true&format=pn g8&bbox=1%2C2%2C3%2C4&bboxSR=10 2100&imageSR=102100&size=256%2C256&f=i mage"double cornerCoordinate =20037508.3427892;/from wkid 3857/102100double originResolution = cornerCoordinate* 2 / 256;double resolution =
11、 originResolution;for (int i = 0; i < level; i+)resolution /= 2;double xmin, ymin, xmax, ymax;/double resolution = 39135.7584820001;xmin = -cornerCoordinate + resolution *256 * col;ymin = cornerCoordinate - resolution * 256* (row + 1);xmax = -cornerCoordinate + resolution *256 * (col + 1);yma
12、x = cornerCoordinate - resolution * 256* row;/string subServices = "stgeometry","stgeometry1", "stgeometry2" ;/string baseUrl ="31:8399/arcgis/rest/services/0/MapSer ver/export?dpi=96&transparent=true&format=png8& amp;bbox=1%2
13、C2%2C3%2C4&bboxSR=10210 0&imageSR=102100&size=256%2C256&f=ima ge&_ts=5"/string subservice = subServices(level +col + row) % subServices.Length;/return string.Format(baseUrl, subservice,xmin, ymin, xmax, ymax, DateTime.Now.Ticks.ToString();if (VisibleLayer
14、s != null)/if null, allsublayers are visible./ex. layers=show:2,4,7 string str = "&layers=show:"for (int i = 0; i <VisibleLayers.Length; i+)str = str.Insert(str.Length,VisibleLayersi.ToString() + ",");str = str.Remove(str.Length -1);/remove last ","baseUr
15、l =baseUrl.Insert(baseUrl.Length, str);if (DisableClientCache)layer.IsInitialized = false;baseUrl =baseUrl.Insert(baseUrl.Length, "&_ts=5");return string.Format(baseUrl, Url, xmin,ymin, xmax, ymax, DateTime.Now.Ticks.ToString();return string.Format(baseUrl, Url, xmin,ymin, xmax, ym
16、ax);else returnMH.private static voidOnUrlPropertyChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)tryClientDynamicTileMapServiceLayer layer =(ClientDynamicTileMapServiceLayer)d;layer.InitializationFailure = null;layer.Refresh();layer.Initialize();catch (Exception ex)MessageBox.Show(&
17、quot;ArcGISDynamicMapServiceLayer Url is invalid!/n" + ex.Message);private static voidOnDisableClientCachePropertyChanged(DependencyObject d,DependencyPropertyChangedEventArgs e)ClientDynamicTileMapServiceLayer layer =(ClientDynamicTileMapServiceLayer)d;if (layer.IsInitialized)layer.IsInitializ
18、ed = false;layer.InitializationFailure = null;layer.Refresh();layer.Initialize();3)增加坐标转化系统:/经纬度转墨卡托public static Point lonLat2Mercator(Point lonLat)if (type<= 1)double x = lonLat.X * 20037508.34 / 180;double M_PI = Math.PI;double y = Math.Log(Math.Tan(90 +lonLat.Y) * M_PI / 360) / (M_PI / 18
19、0);y = y * 20037508.34 / 180;Point mercator = new Point(x, y);return mercator;elsePoint mercator = lonLat;return mercator;/墨卡托转经纬度 public static Point Mercator2lonLat(Point mercator)if (type<= 1)double x = mercator.X / 20037508.34 * 180;double y = mercator.Y / 20037508.34 * 180;double M_PI =
20、Math.PI;y = 180 / M_PI * (2 *Math.Atan(Math.Exp(y * M_PI / 180) - M_PI / 2);Point lonLat = new Point(x, y);return lonLat;elsePoint lonLat=mercator;return lonLat;/示例如下ESRI.ArcGIS.Client.Geometry.Envelope selectedFeatureExtent = feature.Geometry.Extent;double expandPercentage = 100;double widthExpand =selecte
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【正版授权】 ISO 12176-2:2008/Amd 1:2021 EN Plastics pipes and fittings - Equipment for fusion jointing polyethylene systems - Part 2: Electrofusion - Amendment 1
- 【正版授权】 ISO 12151-5:2007 EN Connections for hydraulic fluid power and general use - Hose fittings - Part 5: Hose fittings with ISO 8434-2 37 degree flared ends
- 【正版授权】 ISO 12131-3:2020 EN Plain bearings - Hydrodynamic plain thrust pad bearings under steady-state conditions - Part 3: Guide values for the calculation of thrust pad bearings
- 【正版授权】 ISO 12083:1994 EN Information and documentation - Electronic manuscript preparation and markup
- 【正版授权】 ISO 11998:2006 EN Paints and varnishes - Determination of wet-scrub resistance and cleanability of coatings
- 【正版授权】 ISO 11992-2:2023 EN Road vehicles - Interchange of digital information on electrical connections between towing and towed vehicles - Part 2: Application layer for brakes and
- 【正版授权】 ISO 11901-3:2021 EN Tools for pressing - Gas springs - Part 3: Gas spring with increased spring force and compact built height
- 车联网项目可行性研究咨询报告
- 西装市场发展分析及行业投资战略研究报告
- 袋式除尘器行业市场现状供需分析及市场深度研究发展前景及规划可行性分析研究报告(2024-2030)
- 2024-2030年中国香皂行业市场调研报告
- 江苏省盐城市2023-2024学年下学期七年级英语期末试卷(笔试部分)
- 2023-2024学年仁爱版英语八年级下册期末复习各单元话题写作范文背诵
- 2024年资料员考试题库及完整答案【名师系列】
- 2024年安徽省初中学业水平考试中考英语试卷(真题+答案)
- 2024年湖北恩施州检察机关招聘雇员制检察辅助人员40人历年重点基础提升难、易点模拟试题(共500题)附带答案详解
- 《陆上风电场工程概算定额》NBT 31010-2019
- 生物医学电子学智慧树知到期末考试答案章节答案2024年天津大学
- 中医护理方案分析及改进措施
- 2023 版《中国近现代史纲要》 课后习题答案
- 新教材教师全员培训讲座:2024秋季新教材使用的“四大准备”
评论
0/150
提交评论