今天我们来学关于arcgis影像切片服务,注意这个例子的demo比较简单。我们主要看一下ArcGISMapImageLayer类的UML图。代码是非常简单的。
来看一下源代码,非常简单。
package com.esri.arcgisruntime.sample.mapimagelayer;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import com.esri.arcgisruntime.layers.ArcGISMapImageLayer;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.view.MapView;
public class MainActivity extends AppCompatActivity {
private MapView mMapView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mMapView = (MapView) findViewById(R.id.mapView);
ArcGISMapImageLayer mapImageLayer = new ArcGISMapImageLayer(getResources().getString(R.string.world_elevation_service));
ArcGISMap map = new ArcGISMap();
map.getOperationalLayers().add(mapImageLayer);
mMapView.setMap(map);
}
@Override
protected void onPause(){
super.onPause();
mMapView.pause();
}
@Override
protected void onResume(){
super.onResume();
mMapView.resume();
}
@Override
protected void onDestroy() {
super.onDestroy();
mMapView.dispose();
}
}
ArcGISMapImageLayer 的UML图。