I'm new to GIS and android. When I make my first program using the hello world example, There is only a grey screen in my phone. I don't know what happened. I have been thinking about this for quite a few days. Very annoying!~ Would anybody help me pls?:confused:
/* Copyright 2010 ESRI * * All rights reserved under the copyright laws of the United States * and applicable international laws, treaties, and conventions. * * You may freely redistribute and use this sample code, with or * without modification, provided you include the original copyright * notice and use restrictions. * * See the ?Sample code usage restrictions? document for further information. * */
/** Called when the activity is first created. */ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); map = (MapView) findViewById(R.id.map); //Retrieve the non-configuration instance data that was previously returned. Object init = getLastNonConfigurationInstance(); if (init != null) { map.restoreState((String) init); } }
/** Called by the system, as part of destroying an activity due to a configuration change. */ public Object onRetainNonConfigurationInstance() { return map.retainState(); }