MapController mc = airMapView.getController() ->nullpoint

Put your problem here if it does not fit any of the other categories.

MapController mc = airMapView.getController() ->nullpoint

Postby sommeralex » Sat Mar 15, 2008 3:11 pm

hello.. :cry:

i get a nullPointer exception when doing


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. MapController mc = myMapView.getController();
  3.  
  4.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


within my MapActivity;


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. setContentView(R.layout.mymap);        
  3.  
  4. myMapView = (MapView) findViewById(R.id.mapview);
  5.  
  6.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


my XML:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    android:orientation="vertical"
  6.  
  7.    android:layout_width="fill_parent"
  8.  
  9.    android:layout_height="fill_parent">    
  10.  
  11.        <Button android:id="@+id/cmd_submit"
  12.  
  13.          android:layout_width="fill_parent"
  14.  
  15.          android:layout_height="wrap_content"
  16.  
  17.          android:text="Show me the Route!"/>    
  18.  
  19.      <view id="@+id/mapview"
  20.  
  21.          class="com.google.android.maps.MapView"
  22.  
  23.          android:layout_width="fill_parent"
  24.  
  25.          android:layout_height="fill_parent"
  26.  
  27.          android:layout_weight="1" />
  28.  
  29. </LinearLayout>
  30.  
  31.  
Parsed in 0.002 seconds, using GeSHi 1.0.8.4
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher, MSNbot Media and 18 guests