direction line color google map v2
Posted
by
user1328645
on Stack Overflow
See other posts from Stack Overflow
or by user1328645
Published on 2012-04-13T11:24:10Z
Indexed on
2012/04/13
11:29 UTC
Read the original article
Hit count: 166
JavaScript
I'm using this code to change direction line color in google map v2, but still it won't work even after using getpolyine? How can I change it?
` function direction() {
var txtAddress = document.getElementById("<%=txtAddress.ClientID %>");
var address = txtAddress.value;
var TextBox1 = document.getElementById("<%=TextBox1.ClientID %>");
var address1 = TextBox1.value;
directions = new GDirections(map, directionsPanel);
directions.load("from: " + address1 + " to: " + address + "", { getPolyline: true });
setTimeout(handle, 1000);
// var address =txtAddress.value + " " + TextBox3.value;
}
function handle()
{
var points = [];
var poly = direction.getPolyline();
for (var i = o; i < poly.getVertexCount(); i++) {
points[i] = poly.getVertex(i);
}
var mypoly = new GPolyline(point, "#ff627", 3, 1)
map.addOverlay(mypoly);
}
`
© Stack Overflow or respective owner