mapCallout是幹嘛
原來是在pop地圖效果,我們來自己定義一個
Step1 ::在res下新建一個xml/call.xml文件
Step2:文件內容:
<?xml version="1.0" encoding="UTF-8"?> <resources> <calloutViewStyle titleTextColor="#000000" backgroundColor="#ffffff" anchor="5" /> </resources> |
3 設置樣式:
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);