Hi Everybody,
For my actual GWT Project, i need to add markers on my map. The number
of markers depends, it could be 0-3 of them. I get the datas for the
markers out of my database and in an array. Now i created a method,
witch has a for loop in it. In the for loop, i create the marker and
add it to the map. When i run my application, it stops at the line
"map.addOverlay(shipMarkers[i]);" but there comes no exceptions in the
debugging mode, it only stops and does nothing. I found that out,
because i have a textbox in my UI, where i can give some messages out.
As soon as i remove the line map.addOverlay(), my programm runs to the
end and works perfectly, but without markers..
Here is the code of the method:
private Marker[] getShipMarkersFrom(LinkedList<LatLng>[] latLng) {
shipMarkers = new Marker[latLng.length];
for(int i = 0; i < latLng.length; i++) {
Icon iconAnimation = Icon.newInstance(baseIcon);
iconAnimation.setImageURL("marker_pictures/
ship_marker.png");
MarkerOptions optionsAnimation =
MarkerOptions.newInstance();
optionsAnimation.setIcon(iconAnimation);
LatLng latLngPoint =
LatLng.newInstance(latLng[i].get(0).getLatitude(),latLng[i].get(0).getLongitude());
shipMarkers[i]= new Marker(latLngPoint, optionsAnimation);
map.addOverlay(shipMarkers[i]);
}
return shipMarkers;
}
I'm searching now for more than 3 hours because of this problem. I
would be really happy, if anybody can help me.
Thanks and best regards.
Jan
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.