Arcgis Android - HelloWorld
概述
虽然esri官网上最新版本是10.2.4,但是例子中实在是很难运行,总是出现各种各样的bug.又因为初学是Android,所以不想太浪费时间弄些配置了.决定先将v2.0.0的Arcgis for Android熟悉吧.
1,模拟器的参数的设定根据自己的这篇日志设定:Arcgis android - Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
2,通过New->Project->Arcgis for Android->Arcgis Project for Android的方式创建好默认的项目后,打开/src下的Activity.java文件,修改'onCreate'方法为:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMapView = new MapView(this);//实例化MapView对象
mMapView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
ArcGISTiledMapServiceLayer tileLayer = new
ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");//实例化图层
mMapView.addLayer(tileLayer); //添加图层到地图窗口中
setContentView(mMapView);
}
3,运行,结果为:
补充(需要注意的是,若使用模拟器进行开发,由于对OpenGL ES2.0的要求,需要模拟器支持GPU,需要选择 Android v4.0.3以上的版本.
Arcgis Android - HelloWorld的更多相关文章
- 使用Android Studio与ArcGIS Android SDK的开发环境部署和HelloWorld
android studio(以下简称AS)是google推荐的android专用IDE,替代目前主流的eclipse,另外arcgis也把AS作为推荐的android IDE 本文不介绍androi ...
- 解决ArcGIS Android Could not find class 'com.esri.android.map.MapView'问题
环境win7 64bit sp1,eclipse 4.2.1 ,android API 16,ADT 23.0.2,arcgis android sdk 10.2.4 从arcgis-android- ...
- Arcgis Android 手动搭建开发环境
前言 本文为大家分享arcgis android 环境的手动搭建过程,默认你懂一定的java和android 基础知识,已经有android的开发环境.如缺乏以上环境和知识,请自行补充. 版本介绍 A ...
- arcgis android 10.2.5开发环境配置
android里要添加arcgis android 的支持,其实本质是添加了jar包,so库,清单文件里申请了权限而已. 插件是为了方便创建arcgis android工程,然后并没有什么卵用. ar ...
- 《ArcGIS Runtime SDK for Android开发笔记》——(6)、基于Android Studio的ArcGIS Android工程结构解析
1.前言 Android Studio 是第一个Google官方的 Android 开发环境.其他工具,例如 Eclipse,在 Android Studio 发布之前已经有了大规模的使用.为了帮助开 ...
- arcgis android 图上记录gps轨迹
原文 arcgis android 图上记录gps轨迹 public class MainActivity extends Activity { MapView mMapView; Location ...
- Arcgis android - Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
报错: Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE Please check logcat output for more deta ...
- 关于ArcGIS Android的在x86和x64系统中兼容性的问题与解决方案
我们都知道,在配置ArcGIS Android SDK时,需要在jniLibs目录下放置三个文件夹,分别是armeabi.armeabi-v7a.x86三个文件夹,ArcGIS Android针对目标 ...
- 《ArcGIS Runtime SDK for Android开发笔记》——(4)、基于Android Studio构建ArcGIS Android开发环境
1.前言 2015年1月15日,发布ArcGIS Runtime SDK for Android v10.2.5版本.从该版本开始默认支持android studio开发环境,示例代码的默认开发环境也 ...
随机推荐
- js移动设备手机跳转地址代码
if(/AppleWebKit.*mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alc ...
- 所有语言的Awesome
Awesome Awesomeness A curated list of amazingly awesome awesomeness. Also available on: Awesome-Awes ...
- Couchbase 上手nosql for .net
由于项目需要,准备上手nosql数据库,比对了一番之后终于决定使用 couchbase.好了开始吧: 安装 地址:http://www.couchbase.com/get-started-develo ...
- org.elasticsearch.bootstrap : JNA not found. native methods will be disabled
在pom.xml中添加以下依赖,解决elasticsearch的WARN: <dependency> <groupId>com.sun.jna</groupId> ...
- 令人头痛的ExtJS日期时间控件
1 缘由 Ext提供了日期.时间的控件,但没有将日期和时间组合在一起的控件.在网上搜索时,有前辈创建或重写了时间相关的类,并提供了源码.不得不说那位作者对 extjs 框架理解得很透彻,虽然不知道他当 ...
- 【HDOJ】2772 Matchsticks
纯粹的找规律题.1: 22: 53: 54: 45: 56: 67: 38: 79: 60: 6 2 1 13 7 74 4 115 2 ...
- android sudio 记录
1. KVM is not installed on this machine (/dev/kvm is missing) 原文网址:http://askubuntu.com/questions/56 ...
- 手机端H5点击类目自动定位到相应内容
_obj = {}; /*点击弹出分类*/_obj.openZZ=function(){ document.getElementById("app_screen01").style ...
- 1001 Sum Problem [ACM刷题]
这一段时间一直都在刷OJ,这里建一个博客合集,用以记录和分享算法学习的进程. github传送门:https://github.com/haoyuanliu/Online_Judge/tree/mas ...
- android recovery 主系统代码分析
阅读完上一篇文章: http://blog.csdn.net/andyhuabing/article/details/9226569 我们已经清楚了如何进入正常模式和Recovery模式已有深刻理解了 ...