jkim
unread,Jul 8, 2009, 8:29:19 PM7/8/09Sign 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 Google API Libraries for GWT
Hey guys,
I have added the capability to draw an polygon on my map.
however, if i try to add a marker to the map, when i compile it will
give me a stackoverflowerror.
[java] [ERROR] Unexpected internal compiler error
[java] java.lang.StackOverflowError
[java] at java.util.concurrent.ConcurrentHashMap$Segment.get
(Concurrent
HashMap.java:338)
[java] at java.util.concurrent.ConcurrentHashMap.get
(ConcurrentHashMap.
java:769)
[java] at java.io.ObjectStreamClass.lookup
(ObjectStreamClass.java:268)
[java] at java.io.ObjectOutputStream.writeObject0
(ObjectOutputStream.ja
va:1106)
[java] at java.io.ObjectOutputStream.writeObject
(ObjectOutputStream.jav
a:326)
[java] at java.util.ArrayList.writeObject(ArrayList.java:570)
[java] at sun.reflect.GeneratedMethodAccessor55.invoke
(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMet
hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at java.io.ObjectStreamClass.invokeWriteObject
(ObjectStreamClass
.java:945)
[java] at java.io.ObjectOutputStream.writeSerialData
(ObjectOutputStream
.java:1461)
here is a snippet of my code:
private void createPolyline(final MapWidget map) {
PolyStyleOptions style = PolyStyleOptions.newInstance("#FF0000", 1,
1.0);
final Polyline poly = new Polyline(new LatLng[0]);
map.addOverlay(poly);
poly.setDrawingEnabled();
poly.setStrokeStyle(style);
poly.addPolylineEndLineHandler(new PolylineEndLineHandler() {
public void onEnd(PolylineEndLineEvent event) {
LatLng[] points = new LatLng[] { poly.getBounds().getNorthEast(),
LatLng.newInstance(poly.getBounds().getNorthEast().getLatitude
(), poly.getBounds().getSouthWest().getLongitude()),
poly.getBounds().getSouthWest(),
LatLng.newInstance(poly.getBounds().getSouthWest().getLatitude
(), poly.getBounds().getNorthEast().getLongitude()),
poly.getBounds().getNorthEast() };
Polygon polygon = new Polygon(points, "#FF0000", 1, 1.0,
"#FF0000", .3);
map.addOverlay(polygon);
map.addOverlay(new Marker(LatLng.newInstance(poly.getBounds
().getNorthEast().getLatitude(), poly.getBounds().getSouthWest
().getLongitude())));
map.removeOverlay(poly);
}
});
}
The weird thing is, it will work fine in hosted mode but when i try to
build it with ant, it will throw the stackoverflowerror.
any help would be appreciated.
Regards,
jkim