• JMap.Map.Basemap.activateById

    Apply the basemap on the map.

    Parameters

    • basemapId: string

      The basemap id, use JMap.Map.Basemap.getAllId() to get available basemap ids

    Returns void

    Throws

    Error if basemap not found for the given id

    Example

    // Activate the basemap "streets"
    JMap.Map.Basemap.activateById("streets")

    // Deactivate current basemap
    JMap.Map.Basemap.deactivate()