Map
خواص این المان :
↵ Latitude :
عرض جغرافیایی مرکز نمایش نقشه
↵ Longitude :
طول جغرافیایی مرکز نمایش نقشه
↵ Zoom :
بزرگنمایی نقشه در هنگام شروع
↵ showUserDot :
مقداری true یا false که به ترتیب نمایش یا عدم نمایش نقطه آبی مکان فعلی کاربر را مشخص میکند.
↵ onChange :
در زمان تغییر مکان نقشه توسط کاربر صدا میشود و مقدار آن نیز یک اکشن است.
در ادامه یک نمونه از کد map را مشاهده می کنید:کنید که لوکیشن آن بر دانشگاه شهید بهشتی تنظیم شده است:
<page title="نمایش نتایج روی نتشه" scrollable="false" toolbarColor="#E64724">
<map id="map" width="match_parent" height="match_parent" latitude="{{latitude}}"35.8029459" longitude="{{longitude}}"51.3933681" showUserDot="true" onChange="update/map">
<marker latitude="{{latitude}}" longitude="{{longitude}}"
icon="{{icon_url}}" title="{{title}}" onClick="command/details">
</marker>
<polylineGroup>
<point latitude="{{latitude1}}"35.8029459" longitude="{{longitude1}}" ></point>
<point latitude="{{latitude2}}" longitude="{{longitude2}}"51.3933681" ></point>
</polylineGroup>
</map>
<footer gravity="right" margin_bottom="10" background="#0FFF" height="120" >
<frame width="wrap_content" scrollable="true">
<frame onClick="command/details" width="wrap_content" height="wrap_content" background="#FFF" layout="linear_horizontal" evenweight="false" scrollable="false" borderCornerRadius="2">
<image height="15" width="15" margin_right="210" src="{{image_url}}"/>
<frame width="wrap_content" layout="linear_vertical" scrollable="false">
<text width="wrap_content" text="{{title}}"map"/>
<text width="wrap_content" textsize="15" textcolor="#8e8e8e" text="در چند متری شما"/>
</frame>
</frame>
</frame>
</footer>
</page>
و در نتیجه کد فوق به صورت زیر اجرا میشود :
