Transferred from: http://blog.csdn.net/wozaifeiyang0/article/details/7327423
Localtiledlayer
See whether the title is very excited, title, the example is to add an offline map, this should be a lot of developers long-awaited features, the official version of this should be a big highlight, the original operation offline map is so simple, the following look at the code:
|
Public void onCreate (Bundle savedinstancestate) {
Super. OnCreate (savedinstancestate);
Setcontentview (r.layout. Main);
Map = (Mapview) Findviewbyid (r.id. Map);
The data is stored on the SDcard
The data is created as a tiled cache
Local = new arcgislocaltiledlayer ("File:///mnt/sdcard/<CacheName>/Layers");
Map.addlayer (local);
}
|
See, the code is not much, but the essence, we just copy the offline map cache tiles to our SD card, and then modify the corresponding path in the Arcgislocaltiledlayer can display an offline map, do not forget to add the offline map service to the " Mapview "in.