if(txt1!="") {
var km="";
var disT;
var size1 = new OpenLayers.Size(200);
if(txt1[1]>1000)
{
disT=txt1[1]/1000;
km="千米";
}
else{
km="米";
disT=txt1[1];
}
if(Load_Next==0) {
html1 = "<div class=''><div class=''><p>本站名称 : " + txt1[0] + " </br>距离:" + disT+km+ "</br>下一站名称: " + txt1[2] + "</p></div></div>";
Load_Next++;
}else {
html1 = "<div class=''><div class=''><p>上一站名称 :" + txt1[0] + " </br>距离:" + disT+km+ "</br>本站名称: " + txt1[2] + "</p></div></div>";
Load_Next=0;
}
var popup2 = new OpenLayers.Popup("marker", lonLat1, size1, html1, false);
popup2.setOpacity(0.8);
popup2.div.className="PopupStye";
map.addPopup(popup2);
pop2[popID] = popup2;
popID += 1;
popup2.hide();
marker.events.register('mouseover', marker, function () {
popup2.show();
});
marker.events.register('mouseout', marker, function () {
popup2.hide();
});
}
var popup2 = new Openlayers.Popup("marker",lonLat1,size1,html1,false);
popup2.setOpacity(0.8);
popup2.div.className="PopupStyle";
map.addPopup(popup2);
var km="";
var disT;
var size1 = new OpenLayers.Size(200);
if(txt1[1]>1000)
{
disT=txt1[1]/1000;
km="千米";
}
else{
km="米";
disT=txt1[1];
}
if(Load_Next==0) {
html1 = "<div class=''><div class=''><p>本站名称 : " + txt1[0] + " </br>距离:" + disT+km+ "</br>下一站名称: " + txt1[2] + "</p></div></div>";
Load_Next++;
}else {
html1 = "<div class=''><div class=''><p>上一站名称 :" + txt1[0] + " </br>距离:" + disT+km+ "</br>本站名称: " + txt1[2] + "</p></div></div>";
Load_Next=0;
}
var popup2 = new OpenLayers.Popup("marker", lonLat1, size1, html1, false);
popup2.setOpacity(0.8);
popup2.div.className="PopupStye";
map.addPopup(popup2);
pop2[popID] = popup2;
popID += 1;
popup2.hide();
marker.events.register('mouseover', marker, function () {
popup2.show();
});
marker.events.register('mouseout', marker, function () {
popup2.hide();
});
}
var popup2 = new Openlayers.Popup("marker",lonLat1,size1,html1,false);
popup2.setOpacity(0.8);
popup2.div.className="PopupStyle";
map.addPopup(popup2);