Hello everybody,

i am not a specialist in android-development, please considerate. My 
Problem is, to put the supportmapFragment in a Viewpage. 

when i write the following two methods in a Class names Fragment_Map 
extends fragment, i get at the red marked text the error: *The method 
getSupportFragmentManager() is undefined for the type Fragment_Map**


**private void setUpMapIfNeeded() {
        // Do a null check to confirm that we have not already instantiated 
the map.
        if (mMap == null) {
            // Try to obtain the map from the SupportMapFragment.
            mMap = ((SupportMapFragment)getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
                    
//                    
getSupportFragmentManager().findFragmentById(R.id.map))
//                    .getMap();
//            // Check if we were successful in obtaining the map.
            if (mMap != null) {
                setUpMap();
            }
        }
    }

    private void setUpMap() {
        mMap.addMarker(new MarkerOptions().position(new LatLng(0, 
0)).title("Marker"));
    }*


i got these methods from the 
Sample-Code<https://developers.google.com/maps/documentation/android/intro#sample_code>.
 
Can someone help me with this? i dont know, how to implement this in a 
fragment. i get only errors. plz help and thanks in advance

PS: sry for my english :/

-- 
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to