h5(app),获取腾讯地图操作
访问腾讯地图服务 : http://lbs.qq.com/qqmap_wx_jssdk/index.html;申请自己的Key;
<iframe id="mapPage" width="100%" height="100%" frameborder=0
src="https://apis.map.qq.com/tools/locpicker?search=1&type=1&key=MADBZ-WR53D-V6Y4M-P4RFT-5Z6S6-ZYFER&referer=myapp">
</iframe>
<script>
window.addEventListener('message', function(event) {
var loc = event.data;
var name=loc.cityname;
if(name.length>0){
$(document).ready(function(){
$('#ditu').hide();
$('#contain1').show();
var str="";
str='<div class="info-list-cell b-b" id="xuanzhe" οnclick="Show1();" style="border-bottom:none;line-height: 25px; width: 95%;top: 18%;"> <img style="height:17px;width:19px;margin-left:-3px;" src="WAP_IMG/stact/picture/dizhi.png"/><text class="cell-tit" >所在地区</text><text class="cell-tip" id="diqu" >'+name+'</text><text class="cell-more"></text></div>';
$('#xuanzhe').html(str);
});
}
else{
href='';
}
});
</script>