With the latest Garmin SDK 3.2.3 on a Windows 10 PC I get an error on the D2 Charlie device when switching to the Garmin native map via switchToView(...).
On all other devices this works fine.
Here the error information:
Details: Native base view is not supported.
Stack:
- switchToView() at /Users/rayburn/projects/toolchain5/mbsimulator/submodules/technology/monkeybrains/virtual-machine/api/WatchUi.mb:3851 0x300046be
- handleMapViewSwitch() at G:\Artefacts\TestApp\sources\CIQ3\MapData.mc:152 0x10005c71
- onTimerCallback() at G:\Artefacts\TestApp\sources\CIQ3\AppSpecificModel.mc:438 0x10000e87
Encountered an app crash.
MapData.mc starting with line 151 has following code:
_MapViewModel = new MyMapTrackView();
Ui.switchToView(_MapViewModel, new MyAppDelegate(), Ui.SLIDE_IMMEDIATE);
MyMapTrackView() is defined like that:
class MyMapTrackView extends Ui.MapTrackView {
function initialize() {
MapView.initialize();
// set the current mode for the Map to be preview
setMapMode(Ui.MAP_MODE_PREVIEW);
var top_left = new Position.Location({:latitude => 38.85695, :longitude =>-94.80051, :format => :degrees});
var bottom_right = new Position.Location({:latitude => 38.85391, :longitude =>-94.7963, :format => :degrees});
MapView.setMapVisibleArea(top_left, bottom_right);
// set the bound box for the screen area to focus the map on
MapView.setScreenVisibleArea(0, 0, 240, 240);
}
}