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);

 


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