eclipse中新建arcgis androidsamples for Android为何建不了

我的更多文章
同时转发到微博54ArcGIS+API+for+Android+案例教程
上亿文档资料,等你来发现
54ArcGIS+API+for+Android+案例教程
ESRIArcGISAPIforAndroid案;本文环境:Windows7+ArcGISServ;Android开Щ肪.............;ArcGIS开I件..............;II.理解开J...............;新建一个HelloWorld工程........;I播一些Android基本概念.........;运行返个A
ESRI ArcGIS API for Android 案例教程 吴泳锋 本文环境:Windows 7 + ArcGIS Server 10 + ArcGIS API for Android 1.0 beta Android 开Щ肪.......................................................................... 3 目录 I. 配置开Щ肪 ................................................................................ 3 ArcGIS 开I件........................................................................... 6 II. 理解开J ................................................................................ 8 新建一个 Hello World 工程 .............................................................. 8 I播一些 Android 基本概念 .............................................................. 9 运行返个 ArcGIS Android 程序....................................................... 13 III.
使用 MapView ......................................................................... 18 劢态操作地图服务 ........................................................................ 18 导航不触屏操作........................................................................... 21 IV.
客户端要素 .............................................................................. 25 客户端要素图层........................................................................... 25 通过交互绘制几何对象 .................................................................. 28 V. 查询焓侗................................................................................. 33 空间查询焓粜圆檠 ..................................................................... 33 要素识别 ................................................................................... 35 VI.
几何对象操作不地理处理 ............................................................. 37 几何对象的操作........................................................................... 37 地理处理服务.............................................................................. 39 VII. 要素编辑................................................................................. 42Feature Layer ........................................................................... 42属性编辑 ................................................................................... 44几何编辑 ................................................................................... 45 VIII. 利用 Android 的辅劣功能 ............................................................ 51 定位服务 ................................................................................... 51 IX.
附录 ...................................................................................... 53 常用资源: ................................................................................ 53 等亍“Android 开Щ肪场+“ArcGIS 开I件”,Android 开Щ肪呈腔 Eclipse I. 配置开发环境 ArcGIS API for Android(以下戒称 ArcGIS Android API)的开Щ肪称涫稻 Android 开Щ肪呈腔 Eclipse 的,而 ArcGIS Android API 要求 Eclipse 版 的,因此,骋煜 Eclipse 的应该容易配置。 Android 开发环境1 本为 3.5(Galileo)戒 3.6(Helios)。因此 Android 开Щ肪撑渲玫牡谝徊皆谪≌ 安装 JDK6,然后安装 Eclipse(3.5/3.6,http://www.eclipse.org/downloads/,推荐 Classic 版本,个人推荐 3.5 版本,3.6 的代码提示有点问题)。 在已经拥有 Eclipse 的基础上,随后需要安装 Android SDK。Android SDK 可以从 下载,我一般下载 的是压缩包,直接解压到一个目录下就可以了,比如在我的电脑上,我的 Android SDK 就位亍 D:\Software\Develop\Android\android-sdk-windows 目录下。 下面,我们需要使 Eclipse
Android SDK 联系起来,直到现在,Eclipse 迓丌 知道从哪里去调用 Android SDK,所以,我们迓需要在 Eclipse 中安装 Android 的 Eclipse I件,返个I件叨 Android Development Tool(ADT),安装可以通过 Android 的在线升级地址(https://dl-/android/eclipse/)迕行, 返个过程通过 Eclipse 中的【Help】-&【Install New Software…】菜单触В1 安装文档可以参考:/sdk/installing.html 图 1 安装 Eclipse ADT 插件当安装完成后,通过 Eclipse 的【Window】-&【References】菜单可以看到现 在 Eclipse 中已经存在了 Android 的选项,返时,迓需要指定一下 Android SDK 的路 径,比如在我的电脑上,我需要告诉 Eclipse 的 ADT I件:Android SDK 位亍 D:\Software\Develop\Android\android-sdk-windows 目录下。
图 2 配置 ADT 插件属性使其能找到 Android SDK包含各类专业文献、专业论文、各类资格考试、幼儿教育、小学教育、中学教育、文学作品欣赏、外语学习资料、54ArcGIS+API+for+Android+案例教程等内容。 
 16 ArcGIS API for Android 案例教程 [摘自:http://www.gissky.net/Article/2037.htm] 1 配置开发环境摘要: 摘要:ArcGIS API for Android(以下简称ArcGIS ...  ArcGIS+API+for+Silverlight开发入门_管理学_高等教育_教育专区。如题,用WPF/Silverlight开发ArcGIS基础内容,有实例代码解释第一节、为什么要用 Silverlight API? 你用...  ARCGISSERVER + FLEX、arcgis api for flex入门加实例教程_IT/计算机_专业资料。主要描述从搭建开发环境到用flex实现arcgis view的基本功能中的各个步骤、代码、实现...  android环境搭建+ArcGIS Runtime for Android_计算机软件及应用_IT/计算机_专业资料...我这里 只选了 SDK 2.1 和 samples for api 7 , 自己可以任意自定义,确定...  ArcGIS API For Silverlight (一):图层可见 一 图层可见 性控制这一篇我们给地图加上图层可见性的控制。 在开始之前需要说明一下, 这里的图层和之 前两篇提到...  ArcGIS Engine+C#.net实例开发教程代码_计算机软件及应用_IT/计算机_专业资料。AE...(&ControlsSynchronizer::ReplaceMap:\r\nNew map for replace ment is not ...  ArcGIS for Android (正式的 API 对外发布预计需要到 2011 年 1 月底) 开发环境:目前支持 Windows 平台的 Eclipse 3.5(Galileo),建议下载 Eclipse IDE for Java...  AndroidiPhoneiPad 扫描二维码下载 支持Android / iPhone / iPad文档信息举报文档 ...《ArcGIS Engine+C#实例开发教程》 隐藏&& 第一讲:桌面 GIS 应用程序框架的建立...  1 版权声明: 《ArcGISEngine+C#实例开发教程》为 3SDN(http://www.3sdn.net...(); //添加主地图控件中的所有图层到鹰眼控件中 for(inti=1;i&=this.ax...18107人阅读
本文环境:Windows 7+ArcGIS Server 10+ArcGIS API for Android 1.0 beta
I. 配置开发环境
ArcGIS API for Android(以下简称ArcGIS Android API)的开发环境其实就等于“Android开发环境”+“ArcGIS开发插件”,Android开发环境是基于Eclipse的,因此,只要熟悉Eclipse的应该很容易配置。
Android开发环境
Android开发环境是基于Eclipse的,而ArcGIS Android API要求Eclipse版本为3.5(Galileo)或3.6(Helios)。因此Android开发环境配置的第一步在于正确安装JDK6,然后安装Eclipse(3.5/3.6,,推荐Classic版本)。
在已经拥有Eclipse的基础上,随后需要安装Android SDK。Android SDK可以从下载,我一般下载的是压缩包,直接解压到一个目录下就可以了,比如在我的电脑上,我的Android SDK就位于D:/Software/Develop/Android/android-sdk-windows目录下。
下面,我们需要使Eclipse和Android SDK联系起来,直到现在,Eclipse还不知道从哪里去调用Android SDK,所以,我们还需要在Eclipse中安装Android的Eclipse插件,这个插件叫Android Development Tool(ADT),安装可以通过Android的在线升级地址(https://dl-/android/eclipse/)进行,这个过程通过Eclipse中的【Help】->【Install New Software…】菜单触发:
图 1 安装Eclipse ADT插件
当安装完成后,通过Eclipse的【Window】->【References】菜单可以看到现在Eclipse中已经存在了Android的选项,这时,还需要指定一下Android SDK的路径,比如在我的电脑上,我需要告诉Eclipse的ADT插件:Android SDK位于D:/Software/Develop/Android/android-sdk-windows目录下。
图 2 配置ADT插件属性使其能找到Android SDK
或许你已经注意到了,上面的对话框中列出了两个Android的目标设备:Android 2.1和Android 2.2,但是这两个平台可能并没有显示在你的Eclipse中,因为我已经通过Android SDK提供的SDK Manager工具下载了上面的两个平台,而你需要做的也和我之前做的一样,通过【Window】->【Android SDK and AVD Manager】菜单下载你需要的平台并创建模拟器:
图 3 下载相应版本的Android平台
图 4 创建模拟器
安装文档可以参考:
或称为虚拟设备(AVD,Android Virtual Devices)。
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:428540次
积分:6298
积分:6298
排名:第1709名
原创:178篇
评论:406条
(1)(2)(1)(1)(2)(19)(4)(1)(2)(10)(3)(22)(21)(4)(5)(1)(1)(6)(4)(1)(12)(6)(23)(6)(3)(5)(3)(1)(2)(6)ArcGIS API For Android离线地图的实现 - VirgooooS - ITeye技术网站
博客分类:
今天搞了一个ArcGIS API For Android离线地图的实现。
效果如下:
Android的版本是2.1
main.xml,这里要说明的,初始化范围一定要有,不然会不能显示的。
&?xml version="1.0" encoding="utf-8"?&
&com.esri.android.map.MapView
xmlns:android="/apk/res/android"
android:id="@+id/map" android:layout_width="fill_parent"
android:layout_height="fill_parent"
initExtent="120.99 31.0.."&
&com.esri.arcgis.sample.AgsOfflineTiledLayer android:id="@+id/layer"/&
&/com.esri.android.map.MapView&
AgsLOD.java
package com.esri.arcgis.
import com.esri.core.internal.d.c;
public class AgsLOD extends c {
private static final long serialVersionUID = 1728883L;
public AgsLOD(int level, double scale, double resolution) {
this.level =
this.scale =
this.resolution =
public int a() {
return this.
public double b() {
return this.
public double c() {
return this.
AgsOfflineTiledLayer.java
package com.esri.arcgis.
import java.io.F
import java.util.ArrayL
import javax.xml.parsers.DocumentB
import javax.xml.parsers.DocumentBuilderF
import org.w3c.dom.D
import org.w3c.dom.N
import org.w3c.dom.NodeL
import android.content.C
import android.util.AttributeS
import android.util.L
import com.esri.android.map.TiledL
import com.esri.core.geometry.E
import com.esri.core.geometry.P
import com.esri.core.geometry.SpatialR
import com.esri.core.internal.d.c;
import com.esri.core.internal.d.k;
import com.esri.core.map.TiledLayerM
public class AgsOfflineTiledLayer extends TiledLayer {
//瓦片文件的路径呀
private String location = "/sdcard/BaseMap/Layers";
//REST里面的空间参考
private SpatialReference spatialReference = SpatialReference.create(4326);
//全图范围
private Envelope fullExtent = new Envelope(120.99,
31., 120..);
private k tileI
public AgsOfflineTiledLayer(Context context, AttributeSet attrs) {
super(context, attrs);
} catch (Exception ex) {
ex.printStackTrace();
protected TiledLayerModel initModel() throws Exception {
return new AgsOfflineTiledLayerModel(location, spatialReference, fullExtent, tileInfo);
private void init() {
String confPath = location + File.separator + "conf.xml";
Log.i("conf", confPath);
tileInfo = new k();
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory
.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
File file = new File(confPath);
Document doc = docBuilder.parse(file);
NodeList nsX = doc.getElementsByTagName("X");
double originX = Double.valueOf(nsX.item(0).getFirstChild()
.getNodeValue());
NodeList nsY = doc.getElementsByTagName("Y");
double originY = Double.valueOf(nsY.item(0).getFirstChild()
.getNodeValue());
tileInfo.f = new Point(originX, originY);
NodeList nsTileRows = doc.getElementsByTagName("TileRows");
tileInfo.a = Integer.valueOf(nsTileRows.item(0).getFirstChild()
.getNodeValue());
NodeList nsTileCols = doc.getElementsByTagName("TileCols");
tileInfo.b = Integer.valueOf(nsTileCols.item(0).getFirstChild()
.getNodeValue());
NodeList nsLODInfos = doc.getElementsByTagName("LODInfos");
tileInfo.h = new ArrayList&c&();
NodeList lodInfos = nsLODInfos.item(0).getChildNodes();
for (int j = 0, jcount = lodInfos.getLength(); j & j++) {
Node lod = lodInfos.item(j);
NodeList list = lod.getChildNodes();
int level = Integer.valueOf(list.item(0).getFirstChild()
.getNodeValue());
double scale = Double.valueOf(list.item(1).getFirstChild()
.getNodeValue());
double resolution = Double.valueOf(list.item(2).getFirstChild()
.getNodeValue());
tileInfo.h.add(new AgsLOD(level, scale, resolution));
} catch (Exception e) {
e.printStackTrace();
AgsOfflineTiledLayerModel.java
package com.esri.arcgis.
import java.io.F
import java.io.FileInputS
import android.util.L
import com.esri.core.geometry.E
import com.esri.core.geometry.SpatialR
import com.esri.core.internal.d.k;
import com.esri.core.map.TiledLayerM
public class AgsOfflineTiledLayerModel extends TiledLayerModel {
private static final long serialVersionUID = 9553087L;
public AgsOfflineTiledLayerModel(String location, SpatialReference sr,
Envelope full, k tileInfo) {
super(sr, full, tileInfo);
this.location =
public byte[] getTile(int level, int row, int col) throws Exception {
byte[] result =
String bundlesDir = location + File.separator + "_alllayers";
Log.i("location", bundlesDir);
String l = "0" +
int lLength = l.length();
if (lLength & 2) {
l = l.substring(lLength - 2);
int rGroup = 128 * (row / 128);
String r = "000" + Integer.toHexString(rGroup);
int rLength = r.length();
if (rLength & 4) {
r = r.substring(rLength - 4);
int cGroup = 128 * (col / 128);
String c = "000" + Integer.toHexString(cGroup);
int cLength = c.length();
if (cLength & 4) {
c = c.substring(cLength - 4);
String bundleBase = String
.format("%s/%s/%s%s", bundlesDir, l, r, c);
String bundlxFileName = bundleBase + ".bundlx";
String bundleFileName = bundleBase + ".bundle";
int index = 128 * (col - cGroup) + (row - rGroup);
FileInputStream isBundlx = new FileInputStream(bundlxFileName);
isBundlx.skip(16 + 5 * index);
byte[] buffer = new byte[5];
isBundlx.read(buffer);
long offset = (long) (buffer[0] & 0xff) + (long) (buffer[1] & 0xff)
* 256 + (long) (buffer[2] & 0xff) * 65536
+ (long) (buffer[3] & 0xff) *
+ (long) (buffer[4] & 0xff) * L;
FileInputStream isBundle = new FileInputStream(bundleFileName);
isBundle.skip(offset);
byte[] lengthBytes = new byte[4];
isBundle.read(lengthBytes);
int length = (int) (lengthBytes[0] & 0xff)
+ (int) (lengthBytes[1] & 0xff) * 256
+ (int) (lengthBytes[2] & 0xff) * 65536
+ (int) (lengthBytes[3] & 0xff) * ;
result = new byte[length];
isBundle.read(result);
} catch (Exception ex) {
ex.printStackTrace();
AgsOfflineTiles.java
package com.esri.arcgis.
import com.esri.android.map.MapV
import android.app.A
import android.os.B
public class AgsOfflineTiles extends Activity {
MapView map =
AgsOfflineTiledLayer layer =
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
map = (MapView) findViewById(R.id.map);
layer = (AgsOfflineTiledLayer) findViewById(R.id.layer);
在SD卡的瓦片数据的路径
源码和测试数据在附件中
下载次数: 1852
下载次数: 1848
浏览 22973
楼主,我只要一建arcgis的项目,就在building workspace的时候整个eclipse卡死了...卡很久然后eclipse说内存不足就关掉了...是什么原因啊?eclipse是3.6.2的版本,ADT是12,jdk是1.6的,操作系统是windows xp..机器配置也没有问题,2G内容双核CPU,开发普通的安卓项目和谷歌地图都正常你需要改Eclipse的一个参数,在Eclipse目录下有eclipse.ini文件,打开,拖到最后,改成:-Xms256m-Xmx1024m后者可以改得更大。参见addegg.net
哥们。你这程序,有时候,直接调用,会崩溃。然后再次执行,就能加载好。为啥呢???我也是这样,求解释
& 上一页 1
浏览: 688967 次
来自: 北京
楼主。请教一下。arcgis for android 有提供地 ...
请问如何GET已有网页上的指定内容?比如百度文库中的某一篇文章 ...
您好,我想问问我想换个自己地图的切片,也有4层(L0-L3), ...
使用正则,例如:to_number(REGEXP_REPLAC ...posts - 8,&
comments - 0,&
trackbacks - 0
原来在eclipse里更新的ArcGis API for Android 的插件的版本较老,需要在Esri官网里注册一个账户,然后到ArcGis资源中心那里下载最新的ArcGisAndroidSDK插件,到目前为止ArcGisAndroidSDK的最新beta版本是10.1.1版,下载地址为:
其实,这就是ArcGIS Runtime SDK for Android v10.1.1,然后在Eclipse中用Install New Software…的方式安装这个SDK,完成以后就可以直接新建ArcGis Android项目了!
阅读(...) 评论()

我要回帖

更多关于 arcgis android sdk 的文章

 

随机推荐