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开发环境,示例代码的默认开发环境也 ...
随机推荐
- EclipsePHP Studio 常用设置笔记
工作需要,学习PHP使用EclipsePHP Studio开发工具, 习惯整理下常用的使用设置,分享一下吧: 1.窗口-首选项-常规-工作空间,把文本文件编码改为utf8,以后再新建文件就默认是utf ...
- Unity扩展编辑器--类型1:Editor Windows
Extending the Editor Unity允许你使用自己定制的inspectors和Editor Windows扩展编辑器,并且你可以使用定制的Property Drawers定义属性集在i ...
- centos7 显示中文乱码
(1)# vi /etc/locale.conf LANG="en_US.UTF-8" (2)# vi /etc/sysconfig/i18n LANG="zh_CN.U ...
- VS2012 利用正则统计项目代码行数
原文:VS2012 利用正则统计项目代码行数 #开头和/开头或者空行都不计入代码量, 搜索出来以后最后一行就是代码行数了:
- 【HDOJ】1277 全文检索
AC自动机,静态数组,动态分配TLE. /* 1277 */ #include <iostream> #include <cstdio> #include <cstrin ...
- Yarn应用程序运行流程剖析
Yarn(Yet Another Resource Negotiator)是一个Hadoop集群资源管理系统,Hadoop2时被引入,旨在提高MapReduce的性能,但YARN已足够通用,使得它可以 ...
- Silverlight 中 TreeView 的数据绑定
方法一:Silverlight使用XAML标记语言来编写,如果不使用XAML强大的绑定功能,实在是罪过.通过使用绑定,可以将UI与视图模型层分离,有利于系统的维护.作为Silverlight中比较有代 ...
- Nodejs in Visual Studio Code 02.学习Nodejs
1.开始 源码下载:https://github.com/sayar/NodeMVA 在线视频:https://mva.microsoft.com/en-US/training-courses/usi ...
- apt-mirror
对于centos来说,搭建一个本地源,相对来说,还是比较简单的.对于ubuntu来说,就复杂很多, 估计也和我不熟悉有关. http://unixrob.blogspot.com/2012/05/cr ...
- HPROF学习
抓取HPROF log 1. GUI 可以通过 adt-bundle-windows-x86_64-20140702\sdk\tools\monitor.bat来抓取. 打开软件,选中相应的包,比如“ ...