PDA

View Full Version : reconstruct "free drive" view / "freies Fahren" Ansicht nachbilden



dca
21.01.2015, 14:31
Hello

I try to reconstruct the "free drive" view from Scout-App in my own app.
That means 3-D View and the current position on the map should appear from a driver's perspective.
How can I achieve this ?
With this settings the map appears from a driver's perspective. But not in 3-D.

mapView.getMapSettings().setMapRotationEnabled(tru e);
mapView.getMapSettings().setMapZoomingEnabled(true );
mapView.getMapSettings().setMapPanningEnabled(true );
mapView.getMapSettings().setZoomWithAnchorEnabled( true);
mapView.getMapSettings().setInertiaRotatingEnabled (true);
mapView.getMapSettings().setInertiaZoomingEnabled( true);
mapView.getMapSettings().setInertiaPanningEnabled( true);
mapView.getMapSettings().setCompassPosition(new SKScreenPoint(10, 50));
mapView.getMapSettings().setCompassShown(true);
mapView.getMapSettings().setOneWayArrows(true);
//mapView.getMapSettings().setFollowerMode(SKMapFoll owerMode.POSITION_PLUS_HEADING);
//mapView.getMapSettings().setFollowerMode(SKMapFoll owerMode.POSITION);
mapView.getMapSettings().setFollowerMode(SKMapFoll owerMode.NAVIGATION);
mapView.getMapSettings().setMapDisplayMode(SKMapSe ttings.SKMapDisplayMode.MODE_3D);
mapView.getMapSettings().setCurrentPositionShown(t rue);
mapView.getMapSettings().setStreetNamePopupsShown( true);
mapView.getMapSettings().setHouseNumbersShown(true );

How can I achieve that the current postion follows allways the road i drive on ?
The GPS signal is not accurate enough to do this.

Looking forward to your answers.
Thank you very much in advance !

dandronic
21.01.2015, 15:38
To view the map from a 3D view (isometric view) you have to call:
mapView.getMapSettings().setMapDisplayMode(SKMapSe ttings.SKMapDisplayMode.MODE_3D);

To have the app always follow your position you need to set the follower mode to NAVIGATION, POSITION or POSITION_PLUS_HEADING (depending on your needs). Something like:
mapView.getMapSettings().setFollowerMode(SKMapFoll owerMode.POSITION_PLUS_HEADING);

From the documentation (http://developer.skobbler.com/docs/android/2.3.0/com/skobbler/ngx/map/SKMapSettings.SKMapFollowerMode.html):
NAVIGATION
Map will follow positions , heading , auto zoom is on.
NONE
Simple map mode
POSITION
Map is centered at the current position and if the position changes the map will follow the position.
POSITION_PLUS_HEADING
Map is centered at the current position and if the position changes the map will follow the position and the heading triangle will be shown.

jano
12.02.2015, 12:08
To view the map from a 3D view (isometric view) you have to call:
mapView.getMapSettings().setMapDisplayMode(SKMapSe ttings.SKMapDisplayMode.MODE_3D);


It seems that in 2.3 it works on iOS, but not in Android. Right?

dandronic
12.02.2015, 14:11
It also works on Android:

mapView.getMapSettings().setMapDisplayMode(SKMapDi splayMode.MODE_3D);

See documentation at: http://developer.skobbler.com/docs/android/2.3.0/com/skobbler/ngx/map/SKMapSettings.html#setMapDisplayMode(com.skobbler. ngx.map.SKMapSettings.SKMapDisplayMode)

dca
18.03.2015, 21:36
Thank you !
it works !