小编Far*_*sko的帖子

Arcgis:如何获取设备位置

我试图在我的应用程序中实现此代码,但它不起作用,我不知道我哪里出错了.

基本上,当我启动设备位置的样本时.它没有告诉我我当前的位置在哪里,我没有看到任何类似于我当前位置的蓝点.

我看到的唯一一件事是地图.只是一个简单的缩小地图.

如果有人可以帮我解决如何使用地图上显示的蓝点来获取当前位置,我将非常感激.

这是我的MainActivity.class

public class HelloWorld extends Activity {
MapView mMapView = null;
ArcGISTiledMapServiceLayer tileLayer;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);


    // Retrieve the map and initial extent from XML layout


        mMapView = (MapView) findViewById(R.id.map);

         mMapView.addLayer(new ArcGISTiledMapServiceLayer(
             "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"));

         mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {

           public void onStatusChanged(Object source, STATUS status) {
             if (source == mMapView && status == STATUS.INITIALIZED) {
               LocationService ls = mMapView.getLocationService();
               ls.setAutoPan(false);

               ls.start();
             }

           }

         });



    } …
Run Code Online (Sandbox Code Playgroud)

android map esri arcgis

5
推荐指数
1
解决办法
2226
查看次数

按顺序合并数组

我只是想知道是否有可能按顺序合并两个数组。

我们是否必须使用普通的array,arraylist或其他等等。说我们有2个array变量

//Array 1 :
String[] Array_1 = {"a","b","c"}
String[] Array_2 = {"1","2","3"}

//Now we want to combine both of those array to one. The trick is, we have to do it in such 
//sequence


//Outout
//Array_3 when combined should display in such manner = {"a","1","b","2","c","3"}
Run Code Online (Sandbox Code Playgroud)

先感谢您 :)

java arrays

0
推荐指数
1
解决办法
100
查看次数

标签 统计

android ×1

arcgis ×1

arrays ×1

esri ×1

java ×1

map ×1