Map Kit supports the following types of maps:
| Figure 1 Standard map | Figure 2 Empty map |
| Figure 3 Terrain map |
Map Kit provides two methods to set the map type:
Method 1: During initialization, set MapType in MapOptions to determine the map type to display.
| Attribute | Description |
|---|---|
| Map type in the map initialization parameters. |
Method 2: After a map is created, dynamically set the map type by using the setMapType method.
| Method | Description |
|---|---|
| setMapType(mapType: mapCommon.MapType): void | Sets the map type. |
import { mapCommon } from '@kit.MapKit';Method 1:
this.mapOptions = {
position: {
target: {
latitude: 31.984410259206815,
longitude: 118.76625379397866
},
zoom: 15
},
mapType: mapCommon.MapType.STANDARD
}; The following figure illustrates the effects.

this.mapController.setMapType(mapCommon.MapType.TERRAIN);
The following figure illustrates the effects.
