var point = new google.maps.LatLng(lat, lang);//Code for one marker
if (type == 'CONTROLLER')
{
mark = new google.maps.Marker(
{
position: point,
title: name,
map: map,
icon: "MapImages/controller.png"
});
}
function infowindow() //Code for InfoWindow
{
var i = 0;
var j=0;
var k=0;
var l=0;
var m = 0;
var text =.....;
alert(text);
var AJAX = ob_create();
alert("hello");
AJAX.onreadystatechange = function ()
{
alert(AJAX.readyState);
if (AJAX.readyState == 4 || AJAX.readyState == "complete")
{
document.getElementById("i").innerHTML = AJAX.responseXML.getElementsByTagName("name")[i].firstChild[0].nodeValue;
document.getElementById("j").innerHTML = AJAX.responseXML.getElementsByTagName("add")[j].firstChild[0].nodeValue;
document.getElementById("k").innerHTML = AJAX.responseXML.getElementsByTagName("mac")[k].firstChild[0].nodeValue;
document.getElementById("l").innerHTML = AJAX.responseXML.getElementsByTagName("lat")[l].firstChild[0].nodeValue;
document.getElementById("m").innerHTML = AJAX.responseXML.getElementsByTagName("long")[m].firstChild[0].nodeValue;
}
var url = 'Map3.aspx?Text=' +text.toString();
AJAX.open("Get", url, true);
AJAX.send(null);
}
},
我已经创建了自定义标记和自定义 InfoWindow,上面是我的代码,
在 Infowindow 中,我需要将标记从标记以字符串形式传递到变量文本中,以便我可以以查询字符串格式将其传递给 aspx 页面,但它被视为对象我无法解决这个问题,任何帮助将不胜感激。