"Map data not yet available"

522
6
12-21-2011 01:44 PM
KyleShimabukuro
New Contributor III
Aloha,

Since updating my apps from the beta API to SDK 1.0.1, I've run into a few issues. I'll create separate threads for the sake of clarity.

The first issue is when opening the app, sometimes the basemap is unavailable and tiles that say "Map data not yet available" show up instead.

Here is a video of the behavior:

http://dl.dropbox.com/u/44596312/basemap%20not%20available.mp4

I don't remember experiencing this with the beta API. Is there a way to address this with SDK 1.0.1?

Mahalo!
0 Kudos
6 Replies
ArchanaAgarwal
New Contributor III
Could you repost the video, its contents are not visible.
0 Kudos
KyleShimabukuro
New Contributor III
Please try right-clicking and saving the link as:

http://dl.dropbox.com/u/44596312/basemap%20not%20available.mp4

I was just able to download and view the video again.
0 Kudos
DanO_Neill
Occasional Contributor III
You say that sometimes the map service basemap does show up.  Can you share the map service URL you are using and your java usage to connect to the service URL?   Also share the initial extent if you are setting one either in Java or in XML.
0 Kudos
KyleShimabukuro
New Contributor III
The relevant code from the java file:

MapView map = null;

String baseMapURL = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
String dynamicMapURL = "http://gis.hicentral.com/arcgis/rest/services/OperPublicSafety/MapServer";

@Override
public void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);
  setContentView(R.layout.floodzones);

  map = (MapView) findViewById(R.id.map);
  initextent = new Envelope(-17622457.3032347, 2439157.37937499, -17546524.1970318, 2457953.93517276);
  map.setExtent(initextent, 0);

  ArcGISTiledMapServiceLayer baseMap = new ArcGISTiledMapServiceLayer(baseMapURL);
  this.map.addLayer(baseMap);

  ArcGISDynamicMapServiceLayer dynamicLayer = new ArcGISDynamicMapServiceLayer(dynamicMapURL);
  this.map.addLayer(dynamicLayer);
  dynamicLayer.refresh();

}


And from the layout xml:

<com.esri.android.map.MapView
  android:id="@+id/map" 
  android:layout_height="fill_parent"
  android:layout_width="fill_parent" 
  initExtent="-17622457.3032347 2439157.37937499 -17546524.1970318 2457953.93517276">   
</com.esri.android.map.MapView>
0 Kudos
DanO_Neill
Occasional Contributor III
Thanks for sharing.  Your code seems to consistently work for me so I am not sure what is happening on your end, please refer to attached thumbnail.  Is your app more complex than this?  I am only adding the basemap and dynamicmap you provided so it is very simple.  I would suggest cleaning it up a bit by not setting the 'initextent' in Java since it is already set in your layout xml, although this is not an issue in rendering the service.
0 Kudos
KyleShimabukuro
New Contributor III
You can check out the app here:

https://market.android.com/details?id=gov.honolulu.floodzones

This version is using an older release of the api. I'm basically trying to recompile the app using the new sdk and submit the update to the market.

Not sure if you saw my other issue about enabling caching to the storage device (i.e. sd card), but that's pretty much the only thing holding me back from submitting the new apk. Any help with that would be great.
0 Kudos