i am getting error on the line to set polyline color option my code,
GEvent.addListener(polyline, "click", function() {polyline.setOptions(options: { strokeColor: 'blue' })};
but if i try this,
GEvent.addListener(polyline, "click", function() {alert("clicked");});
it works fine
How to set polyline color on click ??
i also try this,
GEvent.addListener(polyline, "click", function() {PolylineOptions({ strokeStyle: new StrokeStyle({color: 0xFF0000})});
it is also resulting in error HOPES for your reply...
It looks like you're mixing up the Maps API V3 and Maps API V2 syntax.
The following should work.
GEvent.addListener(polyline, "click", function() {
polyline.setStrokeStyle({ color: "#FF0000" });
};
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.