- 浏览: 78375 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
兩ting:
说实话,我没有装成功。。。
Ubuntu上搭建Flex4的开发环境 -
chenzhou123520:
写得很好,赞一个,不过指出一个小错误引用表 2. IoSess ...
Mina服务器开发入门基础,实例讲解 -
jinx3166:
受益良多!
关于flex不能移除监听器总结 -
兩ting:
Flex太强大了,不过会的人不是很多.精通的人就更少了
Ubuntu上搭建Flex4的开发环境 -
liminjun:
你们平时开发也是用Ubuntu吗?Flex做企业项目还是有很大 ...
Ubuntu上搭建Flex4的开发环境
ArcGIS Server flex加载google地图,早已不是什么技术问题。只不过今天结合着项目,底图和项目数据的坐标系统始终没有匹配。即使匹配了,也达不到精度问题。最后,且算是为客户多奉献了一些,将他们的数据重新转换为Web Mector系统,以和Google底图相匹配。囧~~他们的数据量不是有点大,那是相当的大~~
言归正传,ArcGIS Server加载google地图,只需要重写TiledMapServiceLayer类即可。关键代码如下:
- package util
- {
- import com.esri.ags.SpatialReference;
- import com.esri.ags.geometry.Extent;
- import com.esri.ags.geometry.MapPoint;
- import com.esri.ags.layers.TiledMapServiceLayer;
- import com.esri.ags.layers.supportClasses.*;
- import flash.net.URLRequest;
- //扩展TiledMapServiceLayer图层实现加载google地图
- public class GoogleMapLayer extends TiledMapServiceLayer
- {
- private var _tileInfo:TileInfo=new TileInfo();
- private var _baseURL:String="";
- public function GoogleMapLayer()
- {
- super();
- buildTileInfo();
- setLoaded(true);
- }
- override public function get fullExtent():Extent
- {
- return new Extent(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787, new SpatialReference(102113));
- }
- override public function get initialExtent():Extent
- {
- return new Extent(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787, new SpatialReference(102113));
- }
- override public function get spatialReference():SpatialReference
- {
- return new SpatialReference(102113);
- }
- override public function get tileInfo():com.esri.ags.layers.supportClasses.TileInfo
- {
- return _tileInfo;
- }
- //获取URL
- override protected function getTileURL(level:Number, row:Number, col:Number):URLRequest
- {
- var url:String="http://mt0.google.cn/vt/v=w2.114&hl=zh-CN&gl=cn&" + "x=" + col + "&" +
- "y=" + row + "&" + "z=" + level+ "&s=";
- return new URLRequest(url);
- }
- private function buildTileInfo():void
- {
- _tileInfo.height=256;
- _tileInfo.width=256;
- _tileInfo.origin=new MapPoint(-20037508.342787, 20037508.342787);
- _tileInfo.spatialReference=new SpatialReference(102113);
- _tileInfo.lods = [new LOD(0, 156543.033928, 591657527.591555),
- new LOD(1,78271.5169639999, 295828763.795777), new LOD(2, 39135.7584820001, 147914381.897889),
- new LOD(3,19567.8792409999, 73957190.948944), new LOD(4, 9783.93962049996, 36978595.474472),
- new LOD(5,4891.96981024998, 18489297.737236), new LOD(6, 2445.98490512499, 9244648.868618),
- new LOD(7,1222.99245256249, 4622324.434309), new LOD(8, 611.49622628138, 2311162.217155),
- new LOD(9,305.748113140558, 1155581.108577), new LOD(10, 152.874056570411, 577790.554289),
- new LOD(11,76.4370282850732, 288895.277144), new LOD(12, 38.2185141425366, 144447.638572),
- new LOD(13,19.1092570712683, 72223.819286), new LOD(14, 9.55462853563415, 36111.909643),
- new LOD(15,4.77731426794937, 18055.954822), new LOD(16, 2.38865713397468, 9027.977411),
- new LOD(17, 1.19432856685505, 4513.988705), new LOD(18, 0.597164283559817, 2256.994353),
- new LOD(19, 0.298582141647617, 1128.497176)];
- }
- }
- }
package util { import com.esri.ags.SpatialReference; import com.esri.ags.geometry.Extent; import com.esri.ags.geometry.MapPoint; import com.esri.ags.layers.TiledMapServiceLayer; import com.esri.ags.layers.supportClasses.*; import flash.net.URLRequest; //扩展TiledMapServiceLayer图层实现加载google地图 public class GoogleMapLayer extends TiledMapServiceLayer { private var _tileInfo:TileInfo=new TileInfo(); private var _baseURL:String=""; public function GoogleMapLayer() { super(); buildTileInfo(); setLoaded(true); } override public function get fullExtent():Extent { return new Extent(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787, new SpatialReference(102113)); } override public function get initialExtent():Extent { return new Extent(-20037508.342787, -20037508.342787, 20037508.342787, 20037508.342787, new SpatialReference(102113)); } override public function get spatialReference():SpatialReference { return new SpatialReference(102113); } override public function get tileInfo():com.esri.ags.layers.supportClasses.TileInfo { return _tileInfo; } //获取URL override protected function getTileURL(level:Number, row:Number, col:Number):URLRequest { var url:String="http://mt0.google.cn/vt/v=w2.114&hl=zh-CN&gl=cn&" + "x=" + col + "&" + "y=" + row + "&" + "z=" + level+ "&s="; return new URLRequest(url); } private function buildTileInfo():void { _tileInfo.height=256; _tileInfo.width=256; _tileInfo.origin=new MapPoint(-20037508.342787, 20037508.342787); _tileInfo.spatialReference=new SpatialReference(102113); _tileInfo.lods = [new LOD(0, 156543.033928, 591657527.591555), new LOD(1,78271.5169639999, 295828763.795777), new LOD(2, 39135.7584820001, 147914381.897889), new LOD(3,19567.8792409999, 73957190.948944), new LOD(4, 9783.93962049996, 36978595.474472), new LOD(5,4891.96981024998, 18489297.737236), new LOD(6, 2445.98490512499, 9244648.868618), new LOD(7,1222.99245256249, 4622324.434309), new LOD(8, 611.49622628138, 2311162.217155), new LOD(9,305.748113140558, 1155581.108577), new LOD(10, 152.874056570411, 577790.554289), new LOD(11,76.4370282850732, 288895.277144), new LOD(12, 38.2185141425366, 144447.638572), new LOD(13,19.1092570712683, 72223.819286), new LOD(14, 9.55462853563415, 36111.909643), new LOD(15,4.77731426794937, 18055.954822), new LOD(16, 2.38865713397468, 9027.977411), new LOD(17, 1.19432856685505, 4513.988705), new LOD(18, 0.597164283559817, 2256.994353), new LOD(19, 0.298582141647617, 1128.497176)]; } } }
好了,就可以看到效果啦[img][/img]
发表评论
-
BlazeDS的功能原理及配置实例
2013-05-01 23:26 1185BlazeDS Test Drive里面示例了主要的功能: ... -
Flex与Severlet(Jsp)通信传递中文参数乱码问题的解决
2013-02-19 15:51 723Java代码 var url ... -
Java与Flex建立Socket连接
2013-02-17 23:42 893Socket与其他的通信技术最大的不同是Socket连接在数 ... -
Ubuntu上搭建Flex4的开发环境
2013-02-15 20:58 1236原文出自:http://www.brighthub.com/ ... -
flex web应用程序生成自定义右键菜单
2013-01-25 17:13 1106屏蔽浏览器的鼠标右键,同时监听鼠标右键,当触发右键点击事件的 ... -
Flex通过HTTPService与servlet通信
2013-01-16 15:03 1031Flex通过HTTPService与servlet通信 ... -
flex摄像头连接视频录制
2012-12-25 23:55 1655Flex提供了3个类实 ... -
Flex中多线程的实现(摘)
2012-12-25 19:49 1288Flex中多线程的实现 最近在网上看到一个工具 ... -
flash builder 4.7 install for windows 8
2012-12-23 01:02 1329之前在自己的win8上集成fb到myecl ... -
Flex与JavaScript交互调用函数
2012-12-21 09:43 893一、在JavaScript中调用Flex方法 在 Flex ... -
关于flex不能移除监听器总结
2012-12-20 00:07 1914首先看我从网上转载了一篇文章: <!--------- ... -
Flex中TitleWindow关闭按钮CloseButton的定制问题
2012-11-29 16:01 1208问题:TitleWindow的关闭 ... -
flex学习之联动下拉框实现
2012-11-27 12:55 1316Java代码 TbArea.java ... -
flex中弹出确认对话框
2012-11-22 16:30 858Xml代码 <?xml versi ... -
Flex(ActionScript3)解析XML
2012-11-20 17:21 695正文: 对于如下的一个XML文档,在flash中应该怎么读呢 ... -
MessageBroker /amf
2012-11-20 10:58 926MessageBroker 我们称他为信息经纪人,它职责就是把 ... -
Flex3 组件的定位和布局
2012-11-18 19:22 802Flex 组件的定位和布局 大多数 Flex 容器使用预定义 ... -
Flex异步令牌AsyncToken的用法介绍
2012-11-15 09:28 734什么是AsyncToken?官方文档是这样描述的:" ... -
Flex布局简介
2012-11-14 14:38 831★设置组件布局 对于所有的继承自UIComponent的组件包 ... -
Flex编程注意之直接获取某个组件的对象(this[]用法)
2012-11-14 13:09 668有这样一个需求:假如你new了一百次Button,同时这 ...
相关推荐
5. **事件监听**:为了响应用户的交互,如缩放、平移等,你需要监听地图的相应事件,例如MapEvent.LOAD或MapEvent.AFTER_UPDATE。 6. **源码分析**:TianDiTuLayer可能是包含实现以上功能的源代码文件。通过阅读和...
总的来说,"load shape"是一个涉及GIS数据处理、Flex编程和地图渲染的过程。通过合理使用工具和库,开发者能够为Web应用带来强大的地图展示和分析功能。在开发过程中,确保遵循最佳实践,优化性能,提供良好的用户...
<load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>messageBroker</servlet-name> <url-pattern>/messagebroker/*</url-pattern> </servlet-mapping> BlazeDS 所需的...
map.addEventListener(MapEvent.LOAD, mapLoadComplete); this.addChild(map); ``` 以上代码展示了地图控件的初始化过程。此外,还添加了导航工具和绘图工具等常用工具。 ```as3 navToolbar = new Navigation(); ...
<load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>messageBroker</servlet-name> <url-pattern>/messagebroker/*</url-pattern> </servlet-mapping> BlazeDS 所需...
map.addEventListener(MapEvent.LOAD, mapLoadComplete); this.addChild(map); ``` 上述代码创建了一个新的地图实例,并设置了一些基本属性,如隐藏缩放滑块等。接着通过监听`LOAD`事件来触发地图加载完成时的操作...
<load-on-startup>1</load-on-startup> <servlet-name>dispatcher <url-pattern>/ ``` **配置消息代理**: - 在Spring配置文件中定义`message-broker` bean,并指定相应的属性。 - 示例配置: ```xml ...
Based on the popular ArcGIS Viewer for Flex, users can load their own GIS map layers via a Web hosted configuration file. The app includes a number of mobile GIS tools including annotation/measure, ...
map.addEventListene(MapEvent.MAP_LOAD_COMPLETE, function(event:MapEvent):void { changeESRILogo(map); }); ``` 或者,如果你使用的是`MapLoadComplete`事件处理程序,可以直接在函数中调用: ```...
matlab说话代码简历 卢卡·丰塔尼利(Luca Fontanili) import pandas as pd pd . set_option ( 'max_colwidth' , 1000 ...flex;...{display:flex;...load_map_frame (): with open ( 'map_frame.html' ) as
java笔试题小程序Potlatch 2.0 - ActionScript 3 中的 OpenStreetMap 编辑器 Potlatch 2.0 ...OpenStreetMap ...Flex ...api06.dev.openstreetmap.org ...Flex ...-load-config+=debug-config.xml potlatch2.mxml
- **Load过程**: 控制系数和输入数据的加载。 - **SOP过程**: 实现乘积之和的计算。 - **MulGen生成语句**: 生成流水线乘法器。 #### 四、总结 本FIR滤波器的设计充分考虑了性能优化,通过使用流水线技术和并行...
let newItems = data.map(item => { return ` ${item.image}" alt="${item.name}"> ${item.name} ${item.price}元 </div>`; }); document.querySelector('.car-list').innerHTML += newItems.join(''); }) ...