[android-developers] Re: MapView on load

2008-08-25 Thread David Foelber

Apologies, error in my code :D

On Aug 25, 3:10 pm, David Foelber <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Is there a function callback for when the MapView is fully loaded
> (tiles, etc), or when the projection class is valid? The problem I'm
> having is that I'm loading an overlay apparently too early and it's
> crashing the application when it tries to access the view's projection
> class in onDraw().
>
> Or maybe there is a way to check the projection class's validity?
>
> Thanks!
> -David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] MapView on load

2008-08-25 Thread David Foelber

Hi all,

Is there a function callback for when the MapView is fully loaded
(tiles, etc), or when the projection class is valid? The problem I'm
having is that I'm loading an overlay apparently too early and it's
crashing the application when it tries to access the view's projection
class in onDraw().

Or maybe there is a way to check the projection class's validity?

Thanks!
-David
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with MapView

2008-08-20 Thread David Foelber

Worked for me, thanks!

On Aug 20, 3:32 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Move the uses-permission tags above the application tag:
>
>   />
>    
>
>      android:label="@string/app_name">
>      
>
> On Wed, Aug 20, 2008 at 3:44 AM, dapper <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
>
> > I am just starting out with android and for my first app after the
> > tutorial I would like to display a Map. I have basically taken the
> > Sample code and put it into my own project. However I only seem to get
> > the grey grid and no map. Can anyone help (banging my head here). I am
> > using 0.9.
>
> > I know it is something stupid but can't see it.
>
> > Thanks
>
> > This is my main.xml
>
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >        android:layout_width="fill_parent"
> >    android:layout_height="fill_parent">
> >     >        android:id="@+id/map"
> >        android:layout_width="fill_parent"
> >        android:layout_height="fill_parent"
> >        android:enabled="true"
> >        android:clickable="true"
> >        android:apiKey="mymapkey"
> >        />
> > 
>
> > My code
>
> > public class HotelCompanion extends MapActivity {
>
> >        MapView mMapView;
>
> >   [EMAIL PROTECTED]
> >    public void onCreate(Bundle savedInstanceState) {
> >        super.onCreate(savedInstanceState);
> >        setContentView(R.layout.main);
> >        MapView map = (MapView) findViewById(R.id.map);
> >        MapController mc = map.getController();
> >        mc.setZoom(9);
> >    }
>
> >       [EMAIL PROTECTED]
> >        protected boolean isRouteDisplayed() {
> >                return false;
> >        }
> > }
>
> > and my manifest
>
> > 
> > http://schemas.android.com/apk/res/android";
> >    package="dharmesh.android.hotel">
> >    
> >    
>
> >     > android:name="android.permission.ACCESS_COARSE_LOCATION" />
> >    
>
> >         > android:label="@string/app_name">
> >            
> >                
> >                 > android:name="android.intent.category.LAUNCHER" />
> >            
> >        
>
> >    
> > 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem with MapView

2008-08-20 Thread David Foelber

I'm running into this issue as well. From the logs, I get the line:

I/MapActivity( 1106): Handling network change notification:CONNECTED
E/MapActivity( 1106): Couldn't get connection factory client
I/ActivityManager(   53): Displayed activity com.aws.android/.Typhoon:
1591 ms
E/OSNetworkSystem( 1106): unknown socket error -1

I'm guessing that has something to do with it?

dapper wrote:
> Hi there,
>
> I am just starting out with android and for my first app after the
> tutorial I would like to display a Map. I have basically taken the
> Sample code and put it into my own project. However I only seem to get
> the grey grid and no map. Can anyone help (banging my head here). I am
> using 0.9.
>
> I know it is something stupid but can't see it.
>
> Thanks
>
> This is my main.xml
>
> 
> http://schemas.android.com/apk/res/
> android"
>   android:layout_width="fill_parent"
> android:layout_height="fill_parent">
>android:id="@+id/map"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:enabled="true"
> android:clickable="true"
> android:apiKey="mymapkey"
> />
> 
>
> My code
>
> public class HotelCompanion extends MapActivity {
>
>   MapView mMapView;
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> MapView map = (MapView) findViewById(R.id.map);
> MapController mc = map.getController();
> mc.setZoom(9);
> }
>
>   @Override
>   protected boolean isRouteDisplayed() {
>   return false;
>   }
> }
>
> and my manifest
>
> 
> http://schemas.android.com/apk/res/android";
> package="dharmesh.android.hotel">
> 
> 
>
>  android:name="android.permission.ACCESS_COARSE_LOCATION" />
> 
>
>  android:label="@string/app_name">
> 
> 
>  android:name="android.intent.category.LAUNCHER" />
> 
> 
>
> 
> 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---