Bug 358779 - dgml is missing an option center the map (lonlat)
Needs RevisionPublic

Authored by rahn on Feb 2 2016, 7:41 PM.

Details

Summary

Patch by Boris Shtrasman

Some custom map providers will not provide a maps for the entire world , but rather to a small area.
While there is a command line option to start marble to point to a location , it is not a feasible solution when requesting a non technical person to start with command line options (In addition to the need for asking a person to put files a directory)

Diff Detail

Repository
R34 Marble
Lint
Lint Skipped
Unit
Unit Tests Skipped
rahn updated this revision to Diff 2170.Feb 2 2016, 7:41 PM
rahn retitled this revision from to Bug 358779 - dgml is missing an option center the map (lonlat).
rahn updated this object.
rahn edited the test plan for this revision. (Show Details)
rahn added a reviewer: nienhueser.
rahn added a project: Marble.
rahn updated this object.Feb 2 2016, 7:43 PM
rahn added a reviewer: ematirov.
ematirov added inline comments.Feb 2 2016, 8:12 PM
src/lib/marble/geodata/CMakeLists.txt
146

Looks like indentation is broken here.

src/lib/marble/geodata/scene/GeoSceneMap.cpp
55

Maybe use GeoDataCoordinates instead of QVariantList here?

nienhueser added inline comments.Feb 14 2016, 9:58 AM
src/apps/marble-kde/KdeMainWindow.cpp
111

Must also check that lonLat.size() is >1 (or ==2)

Not needed if using GeoDataCoordinates instead of QVariantList, see below. Instead check lonLat.isValid() then.

src/apps/marble-qt/QtMainWindow.cpp
1634

Can we move this method to ControlView (shared between the Qt and KDE applications) to avoid the code duplication?

src/lib/marble/geodata/handlers/dgml/DgmlCenterTagHandler.cpp
4

Wrong license header, see above

src/lib/marble/geodata/handlers/dgml/DgmlCenterTagHandler.h
4

Wrong license header, please copy and adapt from e.g. MarbleWidget.h

src/lib/marble/geodata/scene/GeoSceneMap.h
72

I'd prefer having two methods:

  • parseCenter(const QString &)
  • setCenter(const GeoDataCoordinates &)
78

This should be validated already, i.e. not return a QVariantList, but GeoDataCoordinates. GeoDataCoordinates::isValid() can be used to determine if a center has been set.

nienhueser requested changes to this revision.Feb 28 2016, 9:42 AM
nienhueser edited edge metadata.
This revision now requires changes to proceed.Feb 28 2016, 9:42 AM
rahn added a reviewer: boriss.Apr 3 2016, 12:05 PM