BasemapStyleParameters Class

Basemap from a BasemapStyle. BasemapStyleParameters allows you to set preferences, such as the language to use for basemap labels, when creating a Basemap that suits your application."> BasemapStyleParameters Class | ArcGISQtCpp
  • BasemapStyleParameters
  • class Esri::ArcGISRuntime::BasemapStyleParameters

    Provides parameters for creating a Basemap from a BasemapStyle. BasemapStyleParameters allows you to set preferences, such as the language to use for basemap labels, when creating a Basemap that suits your application. More...

    Header: #include <BasemapStyleParameters.h>
    Since: Esri::ArcGISRuntime 200.3
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    BasemapStyleParameters(QObject *parent = nullptr)
    virtual ~BasemapStyleParameters() override
    Esri::ArcGISRuntime::BasemapStyleLanguageStrategy languageStrategy() const
    void setLanguageStrategy(Esri::ArcGISRuntime::BasemapStyleLanguageStrategy languageStrategy)
    void setSpecificLanguage(const QString &specificLanguage)
    QString specificLanguage() const

    Detailed Description

    BasemapStyleParameters build upon a BasemapStyle to adjust settings for how that style is displayed. For example, you can choose from a set of options that determine the language for displaying labels on the basemap.

    • Set languageStrategy to use local language, use global language, or attempt to use the application locale.

    Once you are finished configuring the options for your BasemapStyleParameters, they can be used with a BasemapStyle to create a Basemap. When the Basemap is loaded, the parameters in the BasemapStyleParameters are evaluated.

    Member Function Documentation

    [explicit] BasemapStyleParameters::BasemapStyleParameters(QObject *parent = nullptr)

    Creates a BasemapStyleParameters that controls how a BasemapStyle is used when constructing a Basemap.

    • parent - The optional parent QObject.

    After creating a BasemapStyleParameters object, BasemapStyle preferences, such as language, can be set.

    A preference for using global, local, or the system locale language can be set using languageStrategy. To define a preference for a specific language, set the specificLanguage property to a supported language code.

    [override virtual] BasemapStyleParameters::~BasemapStyleParameters()

    Destructor.

    Esri::ArcGISRuntime::BasemapStyleLanguageStrategy BasemapStyleParameters::languageStrategy() const

    Returns the option for setting the language for basemap labels. This property allows you to specify an option for the language to use for basemap labels. You can use global or local place names or attempt to use the system locale. If you want to use a specific language, set the specificLanguage property. Note that the specificLanguage property takes precedence over the languageStrategy. If the specificLanguage is a non-empty string, the languageStrategy will be ignored.

    The default value is BasemapStyleLanguageStrategy::Default.

    See also setLanguageStrategy().

    void BasemapStyleParameters::setLanguageStrategy(Esri::ArcGISRuntime::BasemapStyleLanguageStrategy languageStrategy)

    Sets the languageStrategy to languageStrategy.

    See also languageStrategy.

    void BasemapStyleParameters::setSpecificLanguage(const QString &specificLanguage)

    Sets the specificLanguage to specificLanguage.

    See also specificLanguage.

    QString BasemapStyleParameters::specificLanguage() const

    Returns the desired language for place labels on the Basemap or an empty string if no specific language is required. The specificLanguage must be a CLDR (Common Locale Data Repository) format string that uses a two letter language code (e.g. "pt" for Portuguese) optionally followed by a two letter country code (e.g. "pt-BR" for Brazilian Portuguese). If the requested combination of language and country (e.g. "fr-CA") is not supported, the resulting Basemap will use the default global Language code (English).

    The list of supported language codes is shown in the table below. To see the latest list of languages supported by the Basemap Styles Service, see the Languages section of the Basemap. Styles Service documentation:

    Language (CLDR code)Description
    arArabic
    bsBosnian
    bgBulgarian
    caCatalan
    zh-HKChinese (Hong Kong)
    zh-CNChinese (Simplified)
    zh-TWChinese (Taiwan)
    hrCroatian
    csCzech
    daDanish
    nlDutch
    enEnglish
    etEstonian
    fiFinnish
    frFrench
    deGerman
    elGreek
    heHebrew
    huHungarian
    idIndonesian
    itItalian
    jaJapanese
    koKorean
    lvLatvian
    ltLithuanian
    nbNorwegian
    plPolish
    pt-BRPortuguese (Brazil)
    pt-PTPortuguese (Portugal)
    roRomanian
    ruRussian
    srSerbian
    skSlovak
    slSlovenian
    esSpanish
    svSwedish
    thThai
    trTurkish
    ukUkrainian
    viVietnamese

    If a supported language code is supplied, the labels are displayed in the identified language. If an unsupported language code is used, the label language falls back to the closest available language. For example, American English (us-EN) or Canadian French (fr-CA) are not currently supported. These are interpreted as English and French respectively. If no suitable fallback language code is found, labels use the default language for the style.

    The default value is an empty string.

    If set, this property takes precedence over the languageStrategy.

    See also setSpecificLanguage().

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.