0
我有一個GPolyline,當它被點擊時彈出一個信息窗口。我想將鼠標懸停時的默認光標從一隻手轉到一隻指針。有沒有辦法訪問GPolyline風格? 這裏是我的功能googlemaps:將GPolyline光標轉向指針
//add graph to point
function addGraph(data, x, y, color, desc) {
//get map width and height in lat lon
var d = map.getBounds().toSpan();
var height = d.lng();
var width = d.lat();
var maxsize = 0.9;
var pointpair = [];
var increment = (parseFloat(height)/10.0)/100;
var start = new GPoint(parseFloat(x), parseFloat(y));
var volume = parseInt((parseFloat(data) * 100)/maxsize);
pointpair.push(start);
//draw the graph as an overlay
pointpair.push(new GPoint(parseFloat(x + increment), parseFloat(y + increment)));
var line = new GPolyline(pointpair, color, volume);
var label = new Label(new GLatLng(parseFloat(y), parseFloat(x)), parseInt(data * 100) + "%", "f", new GSize(-15, 0));
map.addOverlay(label);
map.addOverlay(line);
GEvent.addListener(line,'click',function(para)
{map.openInfoWindowHtml(para,desc)});
}
+1馬克你的答案爲正確答案。 – 2010-12-02 09:58:03