صفحه ی اول
نمای مینی اپ به صورت زیر است
کد
<page id="choose-from-map" scrollable="false" onshown="script/map-js:init()">
<frame layout="frame" height="match_parent" width="match_parent" margin="0">
<osmmap id="map" width="match_parent" height="match_parent" latitude="35.8029459" longitude="51.3933681"
showUserDot="true" onChange="update/map" margin="0">
<marker latitude="35.8029459" longitude="51.3933681" title="دفترخانه 147" src="images/marker.png"
onMarkerClick="script/map-js:markerClick('1')"/>
</osmmap>
<frame layout="linear_vertical" selfgravity="top" layoutgravity="top" margin_top="16">
<frame layout="linear_horizontal" onclick="page/recent-search"
weightsum="1" reverse="true" borderColor="#E0E0E0" height="56"
borderCornerRadius="28" borderStrokeWidth="0" background="white">
<img width="24" height="24" scaleType="fit_xy" margin_right="10" src="images/location.png"/>
<text text="جستجو..." textcolor="#ADADAD" background="transparent" onclick="page/recent-search"
textalignment="right" gravity="right" weight="1"/>
</frame>
</frame>
<frame layoutgravity="top_right" selfgravity="top_right" layout="linear_horizontal" borderCornerRadius="4"
background="#FFFFFF" height="30" width="wrap_content" margin_top="90" margin_right="12" reverse="true"
padding="6" padding_right="8" padding_left="8" onclick="page/saved">
<img src="images/tag.png" margin="0" />
<text text="دفاتر ذخیره شده من" textcolor="#0164BC" textsize="12" margin="0"/>
</frame>
<frame layoutgravity="bottom_right" layout="linear_vertical" borderCornerRadius="4"
background="#FFFFFF" padding="12" width="50" height="50">
<imagebutton src="images/navigation.png" margin="0"/>
</frame>
</frame>
<include layout="pages/map.js.appsan"/>
<include layout="pages/dialog/search-dialog.xml.appsan"/>
</page>
<script id="map-js">
function init(){
Appsan.runAction("dialog/search-dialog");
}
function markerClick(id){
// console.log("markerClick");
// console.log(id);
// Appsan.setVariable('officeId', '1');
// Appsan.runAction('dialog/map-detail');
}
</script>
No Comments