Hai,
I am getting error when i tried to use the code below.
The below code is used to plot the ployline from a set of points.
There are around thousands of points.
source code:
var requestpath = GXmlHttp.create();
map.clearOverlays();
requestpath.open("GET", "../server/vehicle_path.php?
x="+dateS+"&y="+dateE+"&z="+uid, true);
requestpath.onreadystatechange = function() {
if (requestpath.readyState == 4) {
// var xmlDocpath = GXml.parse(requestpath.responseText);
var xmlDocpath = requestpath.responseXML;
var lines = xmlDocpath.documentElement.getElementsByTagName("line");
// read each line
for (var a = 0; a < lines.length; a++) {
// get any line attributes
var colour = lines[a].getAttribute("colour");
var width = parseFloat(lines[a].getAttribute("width"));
// read each point on that line
var points = lines[a].getElementsByTagName("point");
var pts = [];
for (var i = 0; i < points.length; i++) {
var l=points.length-1;
var mpnt=l/2;
var pnt=Math.round(mpnt);
pts[i] = new GLatLng(parseFloat(points[i].getAttribute
("lat")),
parseFloat(points[i].getAttribute
("lng")));
map.setCenter(new GLatLng(parseFloat(points
[pnt].getAttribute("lat")),
parseFloat(points[pnt].getAttribute
("lng"))),7);
var start_icon=new GLatLng(parseFloat(points
[0].getAttribute("lat")),
parseFloat(points[0].getAttribute("lng")));
var end_icon=new GLatLng(parseFloat(points
[l].getAttribute("lat")),
parseFloat(points[l].getAttribute("lng")));
}
}
error:
A script on this page may be busy, or it may have stopped responding.
You can stop the script now, or you can continue to see if the script
will complete. Script:
http://maps.gstatic.com/intl/en_ALL/mapfiles/159e/maps2.api/main.js:85
Please help me to debug this error.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---