andriod arcgis createPolygons创建带空的面
private void createPolygons() {
// create input polygon 1
PointCollection pointsPoly = new PointCollection(SpatialReferences.getWebMercator());
pointsPoly.add(new Point(-13160, 6710100));
pointsPoly.add(new Point(-13300, 6710500));
pointsPoly.add(new Point(-13760, 6710730));
pointsPoly.add(new Point(-14660, 6710000));
pointsPoly.add(new Point(-13960, 6709400));
inputPolygon1 = new Polygon(pointsPoly);
// create and add a blue graphic to show input polygon 1
SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0x990000CC, lineSymbol);
inputGeometryOverlay.getGraphics().add(new Graphic(inputPolygon1, fillSymbol));
// create input polygon 2 with a green (0xFF009900) symbol
// outer ring
PointCollection outerRingSegmentCollection = new PointCollection(SpatialReferences.getWebMercator());
outerRingSegmentCollection.add(new Point(-13060, 6711030));
outerRingSegmentCollection.add(new Point(-12160, 6710730));
outerRingSegmentCollection.add(new Point(-13160, 6709700));
outerRingSegmentCollection.add(new Point(-14560, 6710730));
outerRingSegmentCollection.add(new Point(-13060, 6711030));
Part outerRing = new Part(outerRingSegmentCollection);
// inner ring
PointCollection innerRingSegmentCollection = new PointCollection(SpatialReferences.getWebMercator());
innerRingSegmentCollection.add(new Point(-13060, 6710910));
innerRingSegmentCollection.add(new Point(-12450, 6710660));
innerRingSegmentCollection.add(new Point(-13160, 6709900));
innerRingSegmentCollection.add(new Point(-14160, 6710630));
innerRingSegmentCollection.add(new Point(-13060, 6710910));
Part innerRing = new Part(innerRingSegmentCollection);
// add both parts (rings) to a part collection and create a geometry from it
PartCollection polygonParts = new PartCollection(outerRing);
polygonParts.add(innerRing);
inputPolygon2 = new Polygon(polygonParts);
// create and add a green graphic to show input polygon 2
fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0x99009900, lineSymbol);
inputGeometryOverlay.getGraphics().add(new Graphic(inputPolygon2, fillSymbol));
}
andriod arcgis createPolygons创建带空的面的更多相关文章
- SQL语句(二)创建带主键和约束的数据表
内容摘要 创建带主键和约束的表 创建带组合主键和外键的表 1. 创建带主键和约束的表 Student (学生表) CREATE TABLE Student ( sclass ) NOT NULL, - ...
- php 中如何创建一个空对象
// 创建一个空对象 $obj=(object)array(); //假设这是从数据库取内容 $arr=["prod_id"=>103,"prod_name&quo ...
- PHP中怎样创建一个空对象?
如果没有声明一个对象然后就对其属性赋值会出现警告.那么我们给它创建一个空对象然后赋值就好了.PHP中创建一个空对象代码如下: 第一种方式: $empty_object = new stdClass() ...
- M1: 创建UWP空项目
本小节介绍如何在Visual Studio中创建一个UWP项目,Visual Studio中提供了快速创建各种项目的类型模板.在Visual Studio 2015中,同样提供了UWP项目模板. 学完 ...
- 写入数据到Plist文件中时,第一次要创建一个空的数组,否则写入文件失败
#pragma mark - 保存数据到本地Plist文件中 - (void)saveValidateCountWithDate:(NSString *)date count:(NSString *) ...
- [转] arcgis Engine创建shp图层
小生 原文 arcgis Engine创建shp图层 以创建点图层为例.首先要得到保存文件的地址. SaveFileDialog saveFileDialog = new SaveFileDialog ...
- (译)iPhone: 用公开API创建带小数点的数字键盘 (OS 3.0, OS 4.0)
(译)iPhone: 用公开API创建带小数点的数字键盘 (OS 3.0, OS 4.0) 更新:ios4.1现在已经将这个做到SDK了.你可以设置键盘类型为UIKeyboardTypeDecimal ...
- 【Android Developers Training】 94. 创建一个空内容提供器(Content Provider)
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
- 【Android Developers Training】 93. 创建一个空验证器
注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...
随机推荐
- EVA:自定义字段实现
原文链接:http://blog.csdn.net/ytangdigl/article/details/70145910 前言 自定义字段又叫做“开放模型”,用户可以根据自已的需求,添加需要的字段,实 ...
- html meta标签使用总结(转)
之前学习前端中,对meta标签的了解仅仅只是这一句. <meta charset="UTF-8"> 但是打开任意的网站,其head标签内都有一列的meta标签.比如我博 ...
- javascript和jquery如何判断元素是否存在最佳。
在传统的Javascript里,当我们对某个页面元素进行某种操作前,最好先判断这个元素是否存在.原因是对一个不存在的元素进行操作是不允许的.例如: document.getElementById(&q ...
- 非ROOT用户不能识别声卡问题
将非ROOT用户加入到audio组中即可 sudo usermod -a -G audio usrname
- N的阶乘末尾有多少个0
N的阶乘(N!)中的末尾有多少个0? N的阶乘可以分解为: 2的X次方,3的Y次方,4的5次Z方,.....的成绩.由于10 = 2 * 5,所以M只能和X和Z有关,每一对2和5相乘就可以得到一个10 ...
- Action(8):Error -27728:Step download timeout(120 seconds)has expired when downloading
Action(8):Error -27728:Step download timeout(120 seconds)has expired when downloading 出现如下图所示对话框上的 ...
- thinkphp签到的实现代码
thinkphp签到的实现代码 数据表 1 2 3 4 5 6 7 8 9 10 11 CREATE TABLE `members_sign` ( `id` int(11) unsigned NO ...
- centos 安装php7、pecl 、swoole、redis拓展
一.更新yum源,安装php7 CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest- ...
- merge into issue
ORA-30926: unable to get a stable set of rows in the source tables 一.经检查,这个错误是由于数据来源表(即语句中,using后面的f ...
- Linux嵌入式文件系统(网络文件系统)
<文件系统定义> 怎么将文件和文件目录加载到linux内核中,这一种加载的方式就叫做文件系统 <建立根文件系统目录和文件> <创建目录> 1)在linux系统中使用 ...