目录

Lite Mode

Overview

In the lite mode, the Map SDK allows your app to show the static map image of a specified location at a specified zoom level to a user. The lite mode supports only static image–based functions. It is useful when the user wants to show multiple maps on one screen, or share their location using social apps such as WeChat Moments.

The following table lists the functions supported by the Map SDK in lite mode.

Function

Support

My location

Completely supported

Interaction gestures

Not supported

Map camera

Partially supported (Tilt and bearing cannot be set and animation is not supported.)

Map event

Only tap and long press events are supported.

Map type

Only standard maps and empty maps are supported.

Marker (Marker)

Only dragging and rotation are not supported.

Marker information window

Completely supported

Overlay (GroundOverlay and TileOverlay)

Not supported

Shape (Circle, Polyline, and Polygon)

Completely supported

Custom map style

Not supported

Enabling the Lite Mode

You can enable the lite mode according to the sample code below:

HuaweiMap( 
    liteMode:true, 
    initialCameraPosition:CameraPosition( 
        target:LatLng(51.5160895,-0.1294527), 
        zoom: _zoom, 
    ), 
    onClick: (LatLng latLng) { 
        log("Map Clicked at ${latLng.lat} : ${latLng.lng}"); 
    }, 
    onLongPress: (LatLng latLng) { 
        log("Map LongClicked at ${latLng.lat} : ${latLng.lng}"); 
    }, 
    markers: markers, 
    circles: circles, 
    logoPadding:EdgeInsets.all(8.0), 
)