Search in sources :

Example 1 with OsmAndMapLayersView

use of net.osmand.plus.views.OsmAndMapLayersView in project Osmand by osmandapp.

the class MapActivity method setupOpenGLView.

private void setupOpenGLView(boolean init) {
    if (settings.USE_OPENGL_RENDER.get() && NativeCoreContext.isInit()) {
        ViewStub stub = (ViewStub) findViewById(R.id.atlasMapRendererViewStub);
        atlasMapRendererView = (AtlasMapRendererView) stub.inflate();
        OsmAndMapLayersView ml = (OsmAndMapLayersView) findViewById(R.id.MapLayersView);
        ml.setVisibility(View.VISIBLE);
        atlasMapRendererView.setAzimuth(0);
        atlasMapRendererView.setElevationAngle(90);
        NativeCoreContext.getMapRendererContext().setMapRendererView(atlasMapRendererView);
        ml.setMapView(mapView);
        mapViewTrackingUtilities.setMapView(mapView);
        mapView.setMapRender(atlasMapRendererView);
        OsmAndMapSurfaceView surf = (OsmAndMapSurfaceView) findViewById(R.id.MapView);
        surf.setVisibility(View.GONE);
    } else {
        OsmAndMapSurfaceView surf = (OsmAndMapSurfaceView) findViewById(R.id.MapView);
        surf.setVisibility(View.VISIBLE);
        surf.setMapView(mapView);
    }
}
Also used : ViewStub(android.view.ViewStub) OsmAndMapSurfaceView(net.osmand.plus.views.OsmAndMapSurfaceView) OsmAndMapLayersView(net.osmand.plus.views.OsmAndMapLayersView)

Aggregations

ViewStub (android.view.ViewStub)1 OsmAndMapLayersView (net.osmand.plus.views.OsmAndMapLayersView)1 OsmAndMapSurfaceView (net.osmand.plus.views.OsmAndMapSurfaceView)1