arcGis for android 學習之callOut

 mapCallout是幹嘛

  原來是在pop地圖效果,我們來自己定義一個

  Step1 ::res下新建一個xml/call.xml文件

  Step2:文件內容:

     

<?xml version="1.0" encoding="UTF-8"?>

<resources>

 <calloutViewStyle

   titleTextColor="#000000" 

   backgroundColor="#ffffff" 

   anchor="5" /> 

 </resources>

 

設置樣式:

 Once this file has been created, you can either use setStyle(int) and pass it the reference of the file (R.xml.MyXmlFileName) or declare an attribut "calloutStyle" for the MapView in your layout. e.g.: 

 <com.esri.android.map.MapView

     xmlns:android="http://schemas.android.com/apk/res/android"

     android:id="@+id/mapview" 

     android:layout_height="fill_parent" 

     android:layout_width="fill_parent" 

     calloutStyle="@xml/call">

 或者:

   mapCallout.setStyle(R.xml.call);

   mapCallout.show(pointClicked);

 


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章