文档详情

ArcGIS Flex API读取自定义瓦片地图.pdf

发布:2017-05-22约7.88千字共9页下载文档
文本预览下载声明
ArcGIS Flex API 读取自定义瓦片地图 PortlandTiledMapServiceLayer.as Java 代码 1. package com.esri.ags.samples 2. { 3. 4. import com.esri.ags.SpatialReference; 5. import com.esri.ags.geometry.Extent; 6. import com.esri.ags.geometry.MapPoint; 7. import com.esri.ags.layers.supportClasses.LOD; 8. import com.esri.ags.layers.supportClasses.TileInfo; 9. import com.esri.ags.layers.TiledMapServiceLayer; 10. 11. import .URLRequest; 12. 13. /** 14. * PortlandTiledMapServiceLayer 15. */ 16. public class PortlandTiledMapServiceLayer extends TiledMapServiceLayer 17. { 18. // 19. // 20. // Constructor 21. // 22. // 23. 24. /** 25. * Creates a new PortlandTiledMapServiceLayer object. 26. */ 27. public function PortlandTiledMapServiceLayer() 28. { 29. super(); 30. 31. buildTileInfo(); // to create our hardcoded tileInfo 32. 33. setLoaded(true); // Map will only use loaded layers 34. } 35. 36. // 37. // 38. // Variables 39. // 40. // 41. 42. private var _tileInfo:TileInfo = new TileInfo(); // see buildTileInfo() 43. private var _baseURL:String = /arcgiscache/Portland_Portland_ESRI_LandBase_AGO/P ortland/_alllayers; 44. 45. // 46. // 47. // Overridden properties 48. // fullExtent() 49. // initialExtent() 50. // spatialReference() 51. // tileInfo() 52. // units() 53. // 54. // 55. 56. 57. // 58. // fullExtent 59. // - required to calculate the tiles to use 60. // 61. 62. override public function get fullExtent():Extent 63. { 64. return new Extent(-123.596895130725, 44.297575737946, -121.553757125519, 46.3683237161949, new SpatialReference(43 26)); 65. } 66. 67. // 68. // initialExtent 69. // - needed if Map doesnt have an extent 70.
显示全部
相似文档