Image ArcGIS MapServer——ArcGIS地图图像服务
2017-06-27 11:32
288 查看
This example shows how to use a dynamic ArcGIS REST MapService. This source type supports Map and Image Services. For dyamic ArcGIS services.
这个例子用来展示如何使用动态的ArcGIS REST MapService,对于动态的ArcGIS服务来说,数据源的类型支持地图和图像服务。
代码:
<!DOCTYPE html> <html> <head> <title>Image ArcGIS MapServer</title> <link rel="stylesheet" href="https://openlayers.org/en/v4.2.0/css/ol.css" type="text/css"> <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="https://openlayers.org/en/v4.2.0/build/ol.js"></script> </head> <body> <div id="map" class="map"></div> <script> //指定ArcGIS地图服务地址 var url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' + 'Specialty/ESRI_StateCityHighway_USA/MapServer'; var layers = [ new ol.layer.Tile({ source: new ol.source.OSM() }), new ol.layer.Image({ /* ol.source.ImageArcGISRest: Source for data from ArcGIS Rest services providing single, untiled images. 来自ArcGIS Rest服务提供的单个、未切片的图像数据源 Useful when underlying map service has labels. 当底图服务有标注时有用 If underlying map service is not using labels, 如果底图服务不使用标注 take advantage of ol image caching and use ol.source.TileArcGISRest data source. 则利用图像缓存并使用ol.source.TileArcGISRest数据源 */ //指定数据源类型为ImageArcGISRest source: new ol.source.ImageArcGISRest({ ratio: 1, params: {}, url: url }) }) ]; var map = new ol.Map({ layers: layers, target: 'map', view: new ol.View({ center: [-10997148, 4569099], zoom: 4 }) }); </script> </body> </html>
相关文章推荐
- Tiled ArcGIS MapServer——ArcGIS瓦片地图服务
- flex调用arcgis地图服务发布地图遇到安全沙箱问题
- ArcGIS10.1 发布并使用地图服务
- ArcGIS Flex API 调用天地图和Google地图服务
- Bing Maps进阶系列三:使用地图图像服务(ImageryService)
- Arcengine 加载地图服务(MapServer)
- arcgis 本地地图服务 silverlight 调用报错
- 【技术类】【ArcGIS对国产卫星的支持2:高分一号卫星】篇11、将镶嵌数据集发布为切片地图服务
- (一)ArcGIS JS 发布动态地图服务
- 天地图应用ArcGIS发布的服务(转)
- (四)ArcGIS JS 加载切片地图服务
- ArcGIS 10.2之地图服务的发布、使用
- arcgis10.3地图服务发布二(外网发布)
- MapServer地图服务的配置
- 在ArcGIS中发布GoogleEarth瓦片为网络地图服务(wms)
- ArcGIS Flex API 调用天地图和Google地图服务
- OpenStreetMap Google 百度 Bing arcgis瓦片地图服务(TMS)以及瓦片计算
- arcgis 10.1 导入数据到oracle 发布地图服务
- arcgis-api-for-js-之添加图层到地图及地图服务设置可见图层
- Arcgis for Server 服务器发布地图服务