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创建带空的面的更多相关文章

  1. SQL语句(二)创建带主键和约束的数据表

    内容摘要 创建带主键和约束的表 创建带组合主键和外键的表 1. 创建带主键和约束的表 Student (学生表) CREATE TABLE Student ( sclass ) NOT NULL, - ...

  2. php 中如何创建一个空对象

    // 创建一个空对象 $obj=(object)array(); //假设这是从数据库取内容 $arr=["prod_id"=>103,"prod_name&quo ...

  3. PHP中怎样创建一个空对象?

    如果没有声明一个对象然后就对其属性赋值会出现警告.那么我们给它创建一个空对象然后赋值就好了.PHP中创建一个空对象代码如下: 第一种方式: $empty_object = new stdClass() ...

  4. M1: 创建UWP空项目

    本小节介绍如何在Visual Studio中创建一个UWP项目,Visual Studio中提供了快速创建各种项目的类型模板.在Visual Studio 2015中,同样提供了UWP项目模板. 学完 ...

  5. 写入数据到Plist文件中时,第一次要创建一个空的数组,否则写入文件失败

    #pragma mark - 保存数据到本地Plist文件中 - (void)saveValidateCountWithDate:(NSString *)date count:(NSString *) ...

  6. [转] arcgis Engine创建shp图层

    小生 原文 arcgis Engine创建shp图层 以创建点图层为例.首先要得到保存文件的地址. SaveFileDialog saveFileDialog = new SaveFileDialog ...

  7. (译)iPhone: 用公开API创建带小数点的数字键盘 (OS 3.0, OS 4.0)

    (译)iPhone: 用公开API创建带小数点的数字键盘 (OS 3.0, OS 4.0) 更新:ios4.1现在已经将这个做到SDK了.你可以设置键盘类型为UIKeyboardTypeDecimal ...

  8. 【Android Developers Training】 94. 创建一个空内容提供器(Content Provider)

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

  9. 【Android Developers Training】 93. 创建一个空验证器

    注:本文翻译自Google官方的Android Developers Training文档,译者技术一般,由于喜爱安卓而产生了翻译的念头,纯属个人兴趣爱好. 原文链接:http://developer ...

随机推荐

  1. SonarQube的安装、配置与使用(windows)

    onarQube是管理代码质量一个开放平台,可以快速的定位代码中潜在的或者明显的错误,下面将会介绍一下这个工具的安装.配置以及使用. 准备工作: 1.jdk(不再介绍) 2.sonarqube:htt ...

  2. SQL之DELETE

    在SQL中DELETE语句用于删除表中的行. 语法 1.删除特定行 DELETE FROM 表名称 WHERE 列名称 = 值 2.删除所有行:在不删除表的情况下删除所有的行.删除之后表的结构.属性和 ...

  3. 利用Metrics+influxdb+grafana构建监控平台

    https://blog.csdn.net/fishmai/article/details/51817429

  4. Java学习(JDBC java连接数据库)

    一.概述 JDBC(Java Data Base Connectivity,java数据库连接)是一种用于执行SQL语句的Java API,可以为多种关系数据库提供统一访问,它由一组用Java语言编写 ...

  5. Spark(八)JVM调优以及GC垃圾收集器

    一JVM结构 1 Java内存结构 JVM内存结构主要有三大块:堆内存.方法区和栈. 堆内存是JVM中最大的一块由年轻代和老年代组成,而年轻代内存又被分成三部分,Eden空间.From Survivo ...

  6. jenkins发布maven项目

    (1)环境介绍 (2)配置ssh配置:系统管理--->系统设置 做这样的配置是方便打包之后war包或jar包复制到/tomcat/update目录下 (3)安装git 1丶不要使用1.8版本以下 ...

  7. 用html5实现的flappy-bird

    可能网上早就有几个flappy-bird的html5版本啦,到这个时候flappy-bird可能也没有之前那么火了,但是作为一个新手,自己思考,自己动手写一个flappy-bird的demo还是很有成 ...

  8. hdu-4027线段树练习

    title: hdu-4027线段树练习 date: 2018-10-10 18:07:11 tags: acm 算法 刷题 categories: ACM-线段树 # 概述 这道线段树的题可以说是我 ...

  9. Form与ModelForm-下拉框或者多选注意//及字段补充

    一.Form 设计一张普通model表: class UserInfo(models.Model): name = models.CharField(verbose_name='员工姓名', max_ ...

  10. 出现报错: module build failed error couldn't find preset es2015 relative to directory

    当用webpack 进行 build 的时候, 会出现如上标题的错误, 解决方式是在 上级 或者 上上级目录,删除 .babelrc 文件