I did it ! :) With Polygon.. it's a bit long, but It's work... I use the JS example in : http://maps.forum.nu/gm_sensitive_circle2.html
With GWT it is : public void doDrawCircle(LatLng center, double radius) { LatLng[] circlePoints = new LatLng[361]; Polygon circle; double PI = 3.1415; double d = radius / 6378.8; // radians double lat1 = (PI / 180) * center.getLatitude(); // radians double lng1 = (PI / 180) * center.getLongitude(); // radians for (int a = 0; a < 361; a++) { double tc = (PI / 180) * a; double y = Math.asin(Math.sin(lat1) * Math.cos(d) + Math.cos(lat1) * Math.sin(d) * Math.cos(tc)); double dlng = Math.atan2(Math.sin(tc) * Math.sin(d) * Math.cos(lat1), Math.cos(d) - Math.sin(lat1) * Math.sin(y)); double x = ((lng1 - dlng + PI) % (2 * PI)) - PI; // MOD function LatLng point = LatLng.newInstance(y * (180 / PI), x * (180 / PI)); circlePoints[a] = point; } circle = new Polygon(circlePoints, "#FF0000", 1, 1.0, "#FF0000", . 7); map.addOverlay(circle); } Thanks eric for Week-end support ;) Samuel On 28 sep, 00:47, "Eric Ayers" <[EMAIL PROTECTED]> wrote: > Actually, I was referring to the Maps API when I said I couldn't find a way > to do it. > > > > On Sat, Sep 27, 2008 at 10:58 AM, Samuel <[EMAIL PROTECTED]> wrote: > > > Thanks eric, > > > I'm sure it's possible with Maps API, but with the gwt-maps API I > > can't find solution. > > > Maybe it's a good solution to use image... > > But I need use getBounds().containsLatLng(..) to known if a point is > > in this circle. I'm not sure it's work with a picture... > > > Samuel > > > On 27 sep, 15:24, "Eric Ayers" <[EMAIL PROTECTED]> wrote: > > > Samuel, > > > > You might want to go search the Maps API google group for this one. I > > don't > > > see an obvious way to make one (like a GCircle or GEllipse class). > > > > The geodesic polyline support uses a segmented line to represent an arc. > > > You could do that by creating a lot of points out for a Polygon. > > > > Another way you could do this is to create an image of a circle and then > > > make a GroundOverlay out of it. It would look a bit different from a > > > Polyline or Polygon. > > > > -Eric. > > > > On Sat, Sep 27, 2008 at 3:58 AM, Samuel <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > I have a very simple question :) > > > > How draw a circle in a maps with gwt-maps library ? > > > > Have you got an example ? (I do Polygon but I can't make circle :( ) > > > > > Thanks > > > > > Samuel > > > > -- > > > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp:// > > code.google.com/webtoolkit/ > > -- > Eric Z. Ayers - GWT Team - Atlanta, GA USAhttp://code.google.com/webtoolkit/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---