Reformat mapviewer example code.


Make code to follow qml coding conventions.
Use switch instead of if-else statement.
Add helper.js with common functions.

Change-Id: Iba989d3677fa428b45609f24a82b26ef7cefe675
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
commitee1deee9a2293a82829efc724ad448aa9a210ae1
parentb384ac3b83ead4593b03594a5ef3d4d82fae8959
authorMichal Klocek <michal.klocek@theqtcompany.com>
committerMichal Klocek <michal.klocek@theqtcompany.com>
commit timeMon, 13 Apr 2015 14:54:56 +0000