原創|使用教程|編輯:郝浩|2013-07-03 15:18:34.000|閱讀 547 次
概述:AnyMap允許用戶添加任意數量的自定義區域到地圖中,使用它們可以在地圖上顯示森林、自定義區或任何其他自定義多邊形。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
Flash地圖控件AnyMap允許用戶添加任意數量的自定義區域到地圖中,使用它們可以在地圖上顯示森林、自定義區或任何其他自定義多邊形。
下面的示例中我們將展示一幅擁有兩個自定義區域的世界地圖——一個用于東半球,一個用于西半球。工具提示將顯示相關信息。
我們需要添加兩個"Area"類型系列,例如北半球系列應該如下所示:
<series name="Norther Hemisphere"> <point y="0" x="-180" /> <point y="0" x="180" /> <point y="90" x="180" /> <point y="90" x="-180" /> </series>
注意,如果多邊形第一點和最后一點是不一樣的,他們會自動連接。
我們還將添加相關的描述,并啟用提示工具來顯示這些信息。添加數據我們將使用如下屬性:
<series name="Northern Hemisphere" type="Area" color="Blue" style="Hemi"> <attributes> <attribute name="info">The Northern Hemisphere or northern hemisphere is the half of a planet that is north of the equator—the word hemisphere literally means 'half ball'. It is also that half of the celestial sphere north of the celestial equator. Earth's northern hemisphere contains most of the land and about 90% of the human population.</attribute> </attributes> <point y="0" x="-180" /> <point y="0" x="180" /> <point y="90" x="180" /> <point y="90" x="-180" /> </series>
在自定義區域內啟用提示工具,只需將它設置在 <data_plot_settings>的<area_series>節點:
<area_series> <tooltip_settings enabled="true"> <font render_as_html="true" /> <format><![CDATA[%cbegin<font face="Verdan" size="10"><b>{%SeriesName}</b><br>{%info} %cend]]></format> </tooltip_settings> </area_series>
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自:慧都控件網