Results 1 to 3 of 3

Thread: How to draw circle given longitude and latitude

  1. #1
    marwen06
    Guest

    Default How to draw circle given longitude and latitude

    Hello,
    I'm using netbeans and I added successfully the worldWindowGLCanvas.
    Now What I want to do is to draw a circle given the longitude and the latitude.
    I want to do exactly like in this link http://goworldwind.org/demos/ -> Surface Shapes. but I couldn't find a source code example.
    I think I must use surface circle but I'm not sure.
    please anyone can help me?
    Thnaks.

  2. #2
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,790

    Default

    The source code for that is in /src/gov/nasa/worldwindx/examples.

  3. #3
    Senior Member heidtmare's Avatar
    Join Date
    Feb 2008
    Location
    Melbourne, FL, USA
    Posts
    676

    Default

    an specifically this is the code for creating a surfacecircle:
    PHP Code:
    // Surface circle over the center of the United states.
    attrs = new BasicShapeAttributes();
    attrs.setInteriorMaterial(Material.GREEN);
    attrs.setOutlineMaterial(Material.CYAN);
    attrs.setInteriorOpacity(0.5);
    attrs.setOutlineOpacity(0.8);
    attrs.setOutlineWidth(3);

    shape = new SurfaceCircle(LatLon.fromDegrees(36, -104), 1e5);
    shape.setAttributes(attrs);
    layer.addRenderable(shape);