1,生成一个图层字段结构信息
TableInfoImpl tii=GisMgr.genTableInfo(config.getLayerName(),new String[]{"SYS_ID"},
new int[]{TableInfo.COLUMN_TYPE_STRING},new int[]{0},nu<rtx w:st="on">ll</rtx>);
/**
* 生成一个图层字段结构信息
* @param layerName String 图层名
* @param colNames String[] 字段名列表--------------默认是col0,col1,col2,col3...
* @param colTypes int[] 字段类型列表
* @param pkCols int[] 主键索引列表----从0开始
* @param coordSys CoordSys 坐标系(为nu<rtx w:st="on">ll</rtx>时使用WGS84做为默认值)
* @return TableInfoImpl
*/
public static TableInfoImpl genTableInfo(String layerName, String[] colNames, int[] colTypes,
int[] pkCols, CoordSys coordSys){
if(coordSys == nu<rtx w:st="on">ll</rtx>)
coordSys = CoordSys.longLatWGS84;
return new TableInfoImpl(layerName, coordSys, colNames, colTypes, colNames.length, pkCols, false);
}
2,增加注释图层
FeatureLayer lyrNebCe<rtx w:st="on">ll</rtx> = GisMgr.addAnnotationLayer(mapj, config.getLayerName(), tii, true);
/**
* 增加注释图层
* @param mapj MapJ
* @param layerName String
* @param tii TableInfoImpl
* @param renew boolean //是否强制新建(会删除原先存在的临时图层)
* @return FeatureLayer
*/
public static FeatureLayer addAnnotationLayer(MapJ mapj, String layerName, TableInfoImpl tii, boolean renew){
Layers layers = mapj.getLayers();
return addAnnotationLayer(layers, layerName, tii, renew);
}
/**
* 增加注释图层
* @param layers Layers
* @param layerName String 图层名称
* @param tii TableInfoImpl 图层字段结构信息(为nu<rtx w:st="on">ll</rtx>时使用默认字段结构,即col0,col1...)
* @return FeatureLayer 添加成功的图层
*/
public static FeatureLayer addAnnotationLayer(Layers layers, String layerName,
TableInfoImpl tii, boolean renew){
FeatureLayer lyr = nu<rtx w:st="on">ll</rtx>;
try{
lyr = (FeatureLayer)layers.get(layerName);
if(lyr!=nu<rtx w:st="on">ll</rtx> && renew){
layers.remove(layerName);
lyr = nu<rtx w:st="on">ll</rtx>;
}
if(lyr == nu<rtx w:st="on">ll</rtx>){
AnnotationTableDescHelper atdh = new AnnotationTableDescHelper(layerName);
AnnotationDataProviderHelper adph = (tii == nu<rtx w:st="on">ll</rtx> ? new AnnotationDataProviderHelper()
: new AnnotationDataProviderHelper(tii));
LocalDataProviderRef ldpr = new LocalDataProviderRef(adph);
lyr = (FeatureLayer)layers.insertLayer(ldpr, atdh, 0, layerName);
}
return lyr;
} catch(Exception e){
log.error("无法添加临时图层:" + layerName, e);
return nu<rtx w:st="on">ll</rtx>;
}
}
|
相关推荐
第10章history对象 第11章layer对象 第12章字符串对象 第13章日期对象 第14章数学对象 第15章数组对象 第16章样式但实例 第17章使用小程序 第18章javaScript语言的扩展 第19章网上购物系统 第20章2000珍藏版 第21...
第11 章 layer 对象. 11.30 layer 属性. 11.31 layer 对象的方法 11.32 JavaScript 操作层 第12 章字符串对象. 12.33 转义字符 12.34 字符串对象的属性 12.35 字符串对象的方法 第 13 章日期对象. 13.36 ...
11.31 layer 对象的方法 11.32 JavaScript 操作层 第12 章 字符串对象 12.33 转 义 字 符 12.34 字符串对象的属性 12.35 字符串对象的方法 第13 章 日期对象 13.36 时间对象的属性 13.37 时间对象的设置 第14 章 数 ...
使用选项实例化UPlayer对象 opt.id 元素的ID由UPlayer创建 opt.fps FPS UPlayer将运行 opt.debug 是否使用调试模型运行UPlayer 全屏 是否全屏显示 插头(可选) 将动画模型插入UPlayer opt.id 该插件的ID opt....
layer弹窗:top.layer弹窗到父页面跨域,通过postMessage方法将子页面的配置对象发送到父页面中,父页面再通过子页面的配置对象打开弹窗,对象内不能存在事件。
使用 在本地开一个服务器bind到某端口, 譬如: ./server 8888, 然后在另一个console运行 ./client 127.0.0.1 8888, 在client端输入即可验证client端的一个Layer对象被 serialize然后发送给server并在server端解析...
前端开源库-object-layer对象层,任何数据库的现代ORM
在Scene对象中可以访问Layer对象和GraphicsLayer3D对象,这两个对象都包含着一个3DProperties对象,用来控制图层中有关三维方面的特性。具体有关对象的特性可以参考联机帮助中对象上提供的接口所属的方法和属性。 ...
第四节 Layer 对象 18 第五节 图层顺序 19 第六节 检查图层类型 20 第七节 检查图层的图元类型 20 第八节 图层缩放 21 第九节 为图层生成标注 22 第十节 注释 24 第十节 栅格图像 24 第十一节 动态图层 25 第十二节...
主要介绍了JavaScript Window窗口对象属性和使用方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
Layer List是Anroid中的一种图形的方式,它是通过叠加若干张图片的方式来形成最终的图片,最终的图片在代码中表现为一个LayerDrawable对象。在android UI 开发中会经常遇到。因此我们有发现好好学习了解它的使用方法...
layer格外注重性能的提升,采用面向对象的思想实现,在多层模式的回调处理中,具备其它多数层组件所没有的“独立不冲突”(已有1855人次关注新版layer)。您完全可以大可放心地在页面弹出任意数量的层,她们彼此不...
MapX 中的可创建对象. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 第 3 章: 地图绘制概念 . . . . . . . . . . . . . . . . . . . . . ...
一、前言 Koa为了保持自身的简洁,并...Layer对象是对单个路由的管理,其中包含的信息有路由路径(path)、路由请求方法(method)和路由执行函数(middleware),并且提供路由的验证以及params参数解析的方法。 相比较L
详细讲解Map对象,Layer对象。以及相关接口IMap、IActiveView、IGraphicsContainer、ILayer、IFeatureLayer
google官方给的demo,主要是讲了android手机和手表的数据同步,包括同步数据,传递Assets文件对象,发送Message消息等。
语言:English (UK) 这是SessionCam.QuickDash.co.uk中...在控制台窗口中查看dataLayer对象属性•查看所有窗口对象属性,包括:--自定义JavaScript变量-自定义JavaScript函数-自定义JavaScript对象•页面加载统计-查看控
demo里code按钮点开显示的layer对象是用SpringView创建的对象,不是我们平时说的layer animateNext(completion: () -> ()),这是动画结束后可以执行的任务的api 关于这个控件响应点击事件的方式1.因为
OpenLayers是一个用于开发WebGIS客户端的JavaScript包。OpenLayers 支持的地图来源包括Google Maps、Yahoo、 Map、微软Virtual Earth 等...OpenLayers采用面向对象方式开发,并使用来自Prototype.js和Rico中的一些组件