Location:

Map Display

Show 3D vector maps with the following code:

                    (For complete code, see the MapViewActivity.java file of the Demo project)
                    // Custom map view
                    private DemoMapView mDemoMapView;
                    // Map rendering control class
                    private MapRenderer mRenderer;
                    /**
                    * Show map,
                    */
                    @Override
                    protected void onCreate (Bundle savedInstanceState) {
                        super.onCreate(savedInstanceState);
                        setContentView(R.layout.mapview);
                        // Initialize the map
                        initMap();
                    }
                    /**
                    * Initialize the map
                    */
                    private void initMap () {
                        try {
                            // load the map
                            mDemoMapView = (DemoMapView) findViewById(R.id.glView_mapview);
                            mDemoMapView.setHandler(handler);     
                        } catch (Exception e) {
                            e.printStackTrace();
                            new MessageBox(this, false).showDialog(e.getMessage());
                        }
                    }
                    /*
                    * Custom map view, all map-related operations can be customized
                    */
                    public class DemoMapView extends MapView {
                        // Initialize the view used to enlarge the drawing
                        // Start simulated navigation
                        // End the simulation navigation
                        // draw a magnified view
                        // Draw the arrow specifying Maneuver
                        // draw the camera
                        // draw multiple routes
                        // draw a single route
                        // Set the route to open Tmc mode
                        // show the route on the map
                        // set the destination
                        // Start counting
                        // Control whether to lock the car
                        // Get the current location of the car
                        // Set the angle of the current car, used to update the angle of the car when navigating
                        // Display a POI message at the specified location on the map
                        // hide the specified route
                        // delete all routes
                        // Map zoom operation
                        // Map zoom out
                        //  ……
                    }
                

3D vector map display effect:

How does the map properly enable satellite maps

Close satellite imagery: MapRenderer.enableSateLayer(false);

Open satellite imagery: MapRenderer.enableSateLayer (true);

 

Note: The satellite map is enabled for the offline map. To copy the satellite image to the cn/satellite folder under the application root directory (for example, /navinfo/app in the global initialization settings), place the corresponding image folder under the satellite. , for example, folders named 7, 8, 9

TOP