- 浏览: 1137803 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
冷酷月光:
楼主。请教一下。arcgis for android 有提供地 ...
ArcGIS API For Android离线地图的实现 -
winney117:
请问如何GET已有网页上的指定内容?比如百度文库中的某一篇文章 ...
三步发布java方式的rest服务 -
zige1012:
您好,我想问问我想换个自己地图的切片,也有4层(L0-L3), ...
ArcGIS API For Android离线地图的实现
测试完毕.地图服务是用ArcGis自带的USA.mxd.还留有的问题就是不能清除,需要重启服务清除。
专题地图:是突出反映一种或几种主题要素的地图,地图的主题要素是根据专门用途的需要确定的,它们应表达的详细,其它的地理要素则根据表达主题的需要作为地理基础选绘。
http://blog.csdn.net/mader/archive/2008/10/16/3084501.aspx
http://webgis.xdz.com.cn/
近日研究了在ArcGIS Server web adf (9.2)专题图实现,整理如下: (以柱状图为例,饼状图和直方图类似),希望对大家有所帮助!
到此完成柱状专题图实现
专题地图:是突出反映一种或几种主题要素的地图,地图的主题要素是根据专门用途的需要确定的,它们应表达的详细,其它的地理要素则根据表达主题的需要作为地理基础选绘。
http://blog.csdn.net/mader/archive/2008/10/16/3084501.aspx
http://webgis.xdz.com.cn/
近日研究了在ArcGIS Server web adf (9.2)专题图实现,整理如下: (以柱状图为例,饼状图和直方图类似),希望对大家有所帮助!
package com.esri.webadf.sample; import java.util.List; import com.esri.adf.web.ags.data.AGSLocalMapResource; import com.esri.adf.web.data.WebContext; import com.esri.adf.web.data.WebLayerInfo; import com.esri.adf.web.data.query.WebQuery; import com.esri.adf.web.faces.event.MapEvent; import com.esri.arcgis.carto.ChartRenderer; import com.esri.arcgis.carto.FeatureLayer; import com.esri.arcgis.carto.ILayer; import com.esri.arcgis.carto.IRendererFields; import com.esri.arcgis.carto.MapServer; import com.esri.arcgis.display.BarChartSymbol; import com.esri.arcgis.display.IChartSymbol; import com.esri.arcgis.display.ILineSymbol; import com.esri.arcgis.display.IMarkerSymbol; import com.esri.arcgis.display.IRgbColor; import com.esri.arcgis.display.ISymbolArray; import com.esri.arcgis.display.RgbColor; import com.esri.arcgis.display.SimpleFillSymbol; import com.esri.arcgis.display.SimpleLineSymbol; import com.esri.arcgis.geodatabase.ICursor; import com.esri.arcgis.geodatabase.IRowBuffer; import com.esri.arcgis.geodatabase.QueryFilter; public class BarChart { private WebContext webContext = null; public WebContext getWebContext() { return webContext; } public void setWebContext(WebContext webContext) { this.webContext = webContext; } public void createBarChart(MapEvent event) { try { //得到制作专题图的图层ID // 。。。。。。。。。。 WebQuery query = event.getWebContext().getWebQuery(); List<WebLayerInfo> layerList = query.getQueryLayers(); for(int i=0;i<layerList.size();i++){ WebLayerInfo info = layerList.get(i); info.getName(); } int layerID = 3; //得到专题图分析元素的属性名称列表 String[] fieldName = new String[2]; fieldName[0] = "POP1990"; fieldName[1] = "POP1999"; //得到专题图分析的图层对象(FeatureLayer) AGSLocalMapResource res = (AGSLocalMapResource) this.webContext.getResources().get("ags1"); MapServer mapServer = res.getLocalMapServer(); ILayer fiLayer; fiLayer = mapServer.getLayer(mapServer.getMapName(0), layerID); FeatureLayer fLayer = (FeatureLayer) fiLayer; //创建ChartRenderer对象 注意:在web adf中创建AO对象用AGSLocalMapResource对象的createArcObject(String)方法 ChartRenderer chartRender = (ChartRenderer) res.createArcObject(ChartRenderer.getClsid()); //在IRendererFileds中指定柱状图各列显示字段值 IRendererFields rendererFields = chartRender; rendererFields.addField(fieldName[0], null); rendererFields.setFieldAlias(0, rendererFields.getField(0)); rendererFields.addField(fieldName[1], null); rendererFields.setFieldAlias(1, rendererFields.getField(1)); //查出各元素指定属性最大值 必须的 QueryFilter queryFilter = (QueryFilter) res.createArcObject(QueryFilter.getClsid()); queryFilter.addField(fieldName[0]); queryFilter.addField(fieldName[1]); ICursor cursor = fLayer.ITable_search(queryFilter, true); int numFields = 2; //柱状图列的个数 int[] fieldIndecies = new int[numFields]; fieldIndecies[0] = fLayer.findField(fieldName[0]); fieldIndecies[1] = fLayer.findField(fieldName[1]); double maxValue = 0; boolean firstValue = true; IRowBuffer row = cursor.nextRow(); while (row != null) { for (int fieldIndex = 0; fieldIndex < numFields; fieldIndex++) { double fieldValue = Double.parseDouble(row.getValue( fieldIndecies[fieldIndex]).toString()); if (firstValue) { maxValue = fieldValue; firstValue = false; } if (fieldValue > maxValue) maxValue = fieldValue; } row = cursor.nextRow(); } //实例化图表对象 BarChartSymbol barChartSymbol = (BarChartSymbol) res.createArcObject(BarChartSymbol.getClsid()); IChartSymbol chartSymbol = barChartSymbol; barChartSymbol.setWidth(10); IMarkerSymbol markerSymbol = barChartSymbol; chartSymbol.setMaxValue(maxValue); markerSymbol.setSize(60); //设置柱状图每列填充颜色及线颜色 SimpleFillSymbol fillSymbol1 = (SimpleFillSymbol) res.createArcObject(SimpleFillSymbol.getClsid()); IRgbColor rgbColor1 = (IRgbColor) res.createArcObject(RgbColor.getClsid()); rgbColor1.setRed(255); rgbColor1.setGreen(0); rgbColor1.setBlue(0); rgbColor1.setUseWindowsDithering(true); ILineSymbol ilinesym1 = (ILineSymbol) res.createArcObject(SimpleLineSymbol.getClsid()); ilinesym1.setColor(rgbColor1); ilinesym1.setWidth(1); fillSymbol1.setOutline(ilinesym1); fillSymbol1.setColor(rgbColor1); barChartSymbol.addSymbol(fillSymbol1); SimpleFillSymbol fillSymbol2 = (SimpleFillSymbol) res.createArcObject(SimpleFillSymbol.getClsid()); IRgbColor rgbColor2 = (RgbColor) res.createArcObject(RgbColor.getClsid()); rgbColor2.setRed(238); rgbColor2.setGreen(195); rgbColor2.setBlue(235); rgbColor2.setUseWindowsDithering(true); ILineSymbol ilinesym2 = (ILineSymbol) res.createArcObject(SimpleLineSymbol.getClsid()); ilinesym2.setColor(rgbColor2); ilinesym2.setWidth(1); fillSymbol2.setOutline(ilinesym2); fillSymbol2.setColor(rgbColor2); barChartSymbol.addSymbol(fillSymbol2); chartRender.setChartSymbolByRef(chartSymbol); chartRender.setUseOverposter(false); //设置FeatureRenderer ChartRenderer对象 fLayer.setRendererByRef(chartRender); //刷新地图显示图表 // map1.refresh(); this.webContext.refresh(); } catch (Exception e) { e.printStackTrace(); } } }
到此完成柱状专题图实现
评论
3 楼
skying8603
2010-09-25
Arcgis javascript1.5 API能不能生成arcgis的专题图啊?请指教
2 楼
sorh
2009-09-03
哎 我这里的问题是 专题图上去了以后 删不掉。。。。
1 楼
langkins
2009-05-25
刚开始做gis web 应用, 正要做专题图,看了你的代码受益良多,但是我不知道用怎样的方式让刷新的效果显示到页面上去?望指教。
回复帖子或者Email都可以,mail:langkins@yahoo.com.cn,
不胜感谢!
回复帖子或者Email都可以,mail:langkins@yahoo.com.cn,
不胜感谢!
发表评论
-
ArcGIS Server 导出地图图片(SOAP)
2011-03-22 17:40 3528package com.esri.arcgis.sampl ... -
ArcGIS Server 集群的问题
2010-12-06 14:49 1756今天在服务器做了一个ArcGIS Server的集群部署加测试 ... -
Server For Flex API在线编辑移动图片符号
2010-11-18 21:57 2023当在点击事件中,用edit工具移动图片(Picture ... -
ArcGIS Server动态读取图层样式(Flex版)
2010-10-26 22:36 5206最近遇到很多人问这类的问题,在ArcGIS10的rest接口已 ... -
Web地图设计模式——ArcGIS Server
2010-06-07 12:54 3121Web地图通常包含底图(提供影像和位置信息)和功能性的专题图层 ... -
Arcgis Server+Asp.net(C#)的唯一值渲染
2010-05-27 23:55 3801#region "唯一值渲染" // ... -
Arcgis server的池化和非池化
2010-05-27 23:52 1983ServerObject的池化和非池 ... -
AO批量处理的经验之谈
2010-02-08 21:37 2384往Personal GDB或SDE GDB中写入要素记录是一件 ... -
任务管理器中arcsom.exe和arcsoc.exe的个数问题
2010-01-22 13:28 1755安装了ArcGIS Server的机器,当打开任务管理器的时候 ... -
ArcGIS空间查询算子
2010-01-20 19:19 25481. Intersect 定义:相交查询算子 ... -
ArcGIS Server的切图原理深入
2009-12-12 11:06 2677GoogleMap,VirtualEarth,YahooMap ... -
关于cache文件格式的选择:png8,png24,png32 or jpeg
2009-11-04 20:56 2498关于如何合理的选择缓存图片的格式: ... -
基于ArcGIS Server对ShapeFile文件的编辑功能实现
2009-05-13 16:46 4082public class PointEdit { ... -
ArcGIS server 常见问题
2009-05-11 13:13 27336更多问题详见:http://www ... -
Attachment support is disabled解决方案
2009-03-08 21:47 6415Unable to find required classes ... -
Ajax Integration and Support in the ArcGIS Java We
2009-03-08 21:34 1994http://edndoc.esri.com/arcobjec ... -
Server Java开发--Born for SOA系列 整理中。。。
2009-02-16 10:36 2079Server Java开发--Born for SOA系列 前 ... -
空间查询及属性文本查询的代码
2009-02-10 13:05 4999package com.esri.adf.web; ... -
Server Java讲座--动态添加图层数据
2009-02-05 11:46 2309有的时候,特别是在做分析时,需要经常添加新的图层到当前的地图中 ... -
Server Java讲座---使用图片和TrueType字体进行标注
2009-02-05 11:41 1665直奔主题吧,接上个主题的讲座的内容,讲讲如何用图片进行标注。在 ...
相关推荐
基于ArcGISServer的城镇地价专题图制作及发布系统设计与实现
本实例是用arcgis server adf 做的 主要是对各种专题图的实现、包括分类专题图、点密度专题图 等
系统介绍ArcGIS的专题图渲染方法,不过并不是所有的渲染方法,想看的话可以再找
WebGIS开发-ArcGIS Server与.NET - 源码.rar 涵盖了地图工具、图层操作、资源操作、专题图操作、查询统计等内容
AspMap是一个小巧的webgis控件,比ARCGIS中ARCGIS SERVER,ARCGIS ENGINE开发方便,支持高性能的AJAX。提供如下c#(csharp),VB.net源码:加载图片,专题,最短路径,车载跟踪,电子商务,政府地理信息,土地规划,农业...
ArcGIS地统计分析模块应用、网络路径分析和矢量空间分析(网络追踪分析及市区选房分析为例)、空间校正、明暗等高线(以土壤项目数据为例)、噪声影响分布分析、专题图制作、三维地形分析、ArcGIS的影像配准、虚拟...
疫情应急调度指挥GIS系统,系统需要ArcgisServer9支持,系统写好各种专题图(区间、单值、 点密度等等)、数据录入接口模块,可根据自己数据进行扩展,需进行二次开发。有很好的升 级维护性。开发者需了解webgis...
系统开发的方法主要是基于JAVA平台,以ARCGIS SERVER为核心和Microsoft Access 2000数据库进行建立的3层B/S结构设计。
第一章 运行环境 4 ...9.2.3专题图件输出与打印 196 9.3统计报表 198 第十章 数据库备份及还原 200 第十一章 不同数据库的转换 205 11.1不同平台之间的转换 205 11.2二调库与苍穹标准库之间的转换 205