[Marble-devel] Re: Draw a lon/lat rectangle

Torsten Rahn tackat at t-online.de
Tue Jun 7 20:05:16 CEST 2011


On Tuesday, 7. June 2011 19:20:14 Kyle Shannon wrote:
> Hello,
> I am brand new to marble and I am interested in using it do display some
> data for my application.  

If you just want to get a single layer of raster imagery onto the globe then 
this might be of help:


Or if you want a more advanced way that requires editing XML files:


> To get my feet wet, I would like to display the
> boundary of an image that the user inputs.  I know the lon/lat of the
> boundaries of the image, and I want to paint that boundary in my marble
> widget. 

If I understand you correctly you want the image painted in a way so that it 
follows the surface of the earth.

Unfortunately for this case GeoPainter::drawPixmap( GeoDataBoundingBox  ) or 
GeoPainter::drawImage( GeoDataBoundingBox  ) is not implemented yet.
Patches or efforts to implement it are welcome. :-)

The only thing that is supported at the moment are "image labels" (think of 
icons ...) where a single geographic coordinate is assigned to the center of 
an image and the image is displayed in screen coordinates.

> I saw the example for the GeoPainter and the ellipse, and I looked
> at the documentation for drawRect(), but I can't seem to figure out how to
> add coordinates to whatever geometry I need to use. 

GeoPainter::drawRect() works just like QPainter::drawRect(): it only draws 
plain rectangles. Same for drawPolygon and drawLine which just draw polygons 
or lines. 

Best Regards,


> Any pointers?  Thanks.
> kss
> /**
>  *
>  * Kyle Shannon
>  * ksshannon at gmail.com
>  *
>  */

More information about the Marble-devel mailing list