码迷,mamicode.com
首页 > 其他好文 > 详细

搜狗给地图打点

时间:2014-12-09 13:42:43      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:style   http   io   ar   os   sp   for   on   cti   

///通过司机list在地图上打点
<c:if test="${!empty DriverList}">
<c:forEach var="driver" items="${DriverList}" varStatus="statu">
<c:choose>
<c:when test="${statu.index+1==1}">
type="S1890";
</c:when>
<c:when test="${statu.index+1==2}">
type="S1891";
</c:when>
<c:when test="${statu.index+1==3}">
type="S1892";
</c:when>
<c:when test="${statu.index+1==4}">
type="S1893";
</c:when>
<c:when test="${statu.index+1==5}">
type="S1894";
</c:when>
<c:when test="${statu.index+1==6}">
type="S1895";
</c:when>
<c:when test="${statu.index+1==7}">
type="S1896";
</c:when>
<c:when test="${statu.index+1==8}">
type="S1897";
</c:when>
<c:when test="${statu.index+1==9}">
type="S1898";
</c:when>
<c:when test="${statu.index+1==10}">
type="S1899";
</c:when>
<c:otherwise>
type="${pageContext.request.contextPath }/jsp/map/images/style/0-1.gif";
</c:otherwise>
</c:choose>
/// myPoint = new EMOTTE.maps.Point(${NumberTools.stringToLong(driver.longitude)/1e2},${NumberTools.stringToLong(driver.latitude)/1e2});
myPoint = new EMOTTE.maps.Point(${(driver.longitude) / 100000},${(driver.latitude) / 100000});
var name = "${driver.driverName}";
marker${statu.index} = new EMOTTE.maps.Marker({
map: map,
position: myPoint,
label:{visible:true,align:"TOP"},
title: name,
styleId: type
});


EMOTTE.maps.event.addListener(marker${statu.index}, ‘click‘, function()
{
///var id = "${NumberTools.stringToLong(driver.id) }";
var id = "${driver.id}";
if(null==id||id=="")return;
window.parent.document.getElementById("showMember4ADinner").innerHTML="读取中";
var req=new XMLHttpRequest();
if (req) {
req.onreadystatechange=function() {
if (req.readyState==4 && req.status==200) {
if (null == req.responseText || "" == req.responseText) {
return;
}
window.parent.document.getElementById("showMember4ADinner").innerHTML = req.responseText;
}
}

req.open(‘POST‘,‘/EdjDriver.do?action=findDriverById‘);
req.setRequestHeader(‘Content-Type‘, ‘application/x-www-form-urlencoded‘);
req.send("drId="+id);
}
});

</c:forEach>
</c:if>

搜狗给地图打点

标签:style   http   io   ar   os   sp   for   on   cti   

原文地址:http://www.cnblogs.com/zrfmmhy/p/4152884.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!