GSoC/GCI Archive
Google Code-in 2014 KDE

Marble: Create more sane defaults for the "Add GroundOverlay" feature

completed by: Mikhail Ivchenko

mentors: Dennis Nienhüser, shentey, Torsten Rahn

When clicking "Add GroundOverlay a dialog appears that allows to create a ground overlay.

By default for latitude and longitude this displays "0" values. This doesn't produce a meaningful result. Instead please

- Determine the coordinates of the viewport center

- Determine the latLonAltBox of the viewport. Check the latitude range and the longitude range of the viewport latLonAltBox and determine the delta between the highest and lowest value.

- Set the "N" value to a quarter of the delta of the latitude PLUS the latitude of the viewport center.

- Set the "S" value to a quarter of the delta of the latitude MINUS the latitude of the viewport center.

- Set the "W" value to a quarter of the delta of the longitude MINUS the longitude of the viewport center.

- Set the "E" value to a quarter of the delta of the longitude PLUS the longitude of the viewport center.