Leo
unread,Mar 23, 2011, 7:02:03 PM3/23/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Gothere API
Hi, there!
In the following code, I try to change the style of a polygon.
GEvent.addListener(polygon, "mouseover", function(overlay,
latlng) {
var options = {
strokeColor: "#ff0000",
strokeWeight: 5,
strokeOpacity: 0.6,
fillColor: "#0000ff",
fillOpacity: 0.4
};
polygon.setFillStyle(options);
});
It seems to me that 'GPolygonOptions' is not available on your
website, and I made up the "options" variable. But I can't get the
correct result.
BTW, the polygon is previously initialized to:
polygon = new GPolygon([
new GLatLng(1.304001, 103.832),
new GLatLng(1.30267, 103.836),
new GLatLng(1.30046, 103.839),
new GLatLng( 1.29916, 103.837)
], "#ff0000", 5, 0.3, "#0000ff", 0.1);
So my purpose here, is to make the polygon area clearer after
mouseover it.
Can you tell me how I can do this?
Further more, actually above code is a "round the way" solution to my
website. Ideally, I wish the polygon to be hidden first, then show up
upon mouseover. But I cannot do that, because after the polygon hide,
"polygon.show()" won't find the polygon where it should be.
I'll appreciate it if you could help me solve this problem!
Leo