Display Map v2 in popup Window not display in android?

前端 未结 2 1458
甜味超标
甜味超标 2021-01-22 20:00

i want to open the popup window on that i used the map v2 for displaying map v2 in popup window but is not display here i put my xml layout and activity class

相关标签:
2条回答
  • 2021-01-22 20:13

    their is only two silly problem as I found .. You just change this fragment

                    <fragment
                    android:id="@+id/popupmapview"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_margin="10dp"
                    class="com.google.android.gms.maps.SupportMapFragment" />
    

    to this..

                    <fragment
                    android:id="@+id/popupmapview"
                    android:layout_width="fill_parent"
                    android:layout_height="fill_parent"
                    android:layout_margin="10dp"
                    class="com.google.android.gms.maps.MapFragment" />
    

    and change a line in method [initiatePopupWindow]

    map= ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.popupmapview)).getMap(); 
    

    to this..

    map = ((MapFragment) getFragmentManager().findFragmentById(R.id.popupmapview)).getMap();
    
    0 讨论(0)
  • 2021-01-22 20:25

    this may Helps you Check Here check here all Your Require possibility to show map is Full Fill or not IN AndroidManifest.xml

    <permission
            android:name="your.Activity.permission.MAPS_RECEIVE"
            android:protectionLevel="signature" />
    
        <uses-feature
            android:glEsVersion="0x00020000"
            android:required="true" />
        <uses-permission android:name="your.Activity.permission.MAPS_RECEIVE" />
    
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_CORSE_LOCATION" />
    
    <meta-data    
       android:name="com.google.android.maps.v2.API_KEY"    
       android:value="your_api_key"/>
    
    0 讨论(0)
提交回复
热议问题