diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.cpp new file mode 100644 index 0000000000..7fdfc8ea22 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.cpp @@ -0,0 +1,104 @@ +// [WriteFile Name=ConfigureBasemapStyleLanguage, Category=Maps] +// [Legal] +// Copyright 2024 Esri. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// [Legal] + +#ifdef PCH_BUILD +#include "pch.hpp" +#endif // PCH_BUILD + +#include "Basemap.h" +#include "BasemapStyleParameters.h" +#include "ConfigureBasemapStyleLanguage.h" +#include "Map.h" +#include "MapQuickView.h" +#include "MapTypes.h" +#include "Point.h" +#include "SpatialReference.h" +#include "Viewpoint.h" + +#include + +using namespace Esri::ArcGISRuntime; + +ConfigureBasemapStyleLanguage::ConfigureBasemapStyleLanguage(QObject* parent /* = nullptr */) : + QObject(parent), + m_map(new Map(SpatialReference::webMercator(), this)), + m_basemapStyleParameters(new BasemapStyleParameters(this)) +{ +} + +ConfigureBasemapStyleLanguage::~ConfigureBasemapStyleLanguage() = default; + +void ConfigureBasemapStyleLanguage::init() +{ + // Register the map view for QML + qmlRegisterType("Esri.Samples", 1, 0, "MapView"); + qmlRegisterType("Esri.Samples", 1, 0, "ConfigureBasemapStyleLanguageSample"); +} + +MapQuickView* ConfigureBasemapStyleLanguage::mapView() const +{ + return m_mapView; +} + +// Set the view (created in QML) +void ConfigureBasemapStyleLanguage::setMapView(MapQuickView* mapView) +{ + if (!mapView || mapView == m_mapView) + return; + + m_mapView = mapView; + m_mapView->setMap(m_map); + + const Point point(3144804, 4904598); + + // Create a Viewpoint object with the created Point and a scale of 10000000 + const Viewpoint viewpoint(point, 10000000); + + // Set the viewpoint for the mapView + mapView->setViewpointAsync(viewpoint); + + emit mapViewChanged(); +} + +// Set new basemap language based on the parameters selected +void ConfigureBasemapStyleLanguage::setNewBasemapLanguage(bool global, const QString& language) +{ + m_basemapStyleParameters->setLanguageStrategy(global ? BasemapStyleLanguageStrategy::Global : BasemapStyleLanguageStrategy::Local); + + // A SpecificLanguage setting overrides the LanguageStrategy settings + if (language == "none") + { + m_basemapStyleParameters->setSpecificLanguage(""); + } + else if (language == "Bulgarian") + { + m_basemapStyleParameters->setSpecificLanguage("bg"); + } + else if (language == "Greek") + { + m_basemapStyleParameters->setSpecificLanguage("el"); + } + else if (language == "Turkish") + { + m_basemapStyleParameters->setSpecificLanguage("tr"); + } + + if (m_basemap) + m_basemap->deleteLater(); + + m_basemap = new Basemap(BasemapStyle::OsmLightGray, m_basemapStyleParameters, this); + m_map->setBasemap(m_basemap); +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.h b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.h new file mode 100644 index 0000000000..837f471cdb --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.h @@ -0,0 +1,57 @@ +// [WriteFile Name=ConfigureBasemapStyleLanguage, Category=Maps] +// [Legal] +// Copyright 2024 Esri. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// [Legal] + +#ifndef CONFIGUREBASEMAPSTYLELANGUAGE_H +#define CONFIGUREBASEMAPSTYLELANGUAGE_H + +namespace Esri::ArcGISRuntime { + class Basemap; + class BasemapStyleParameters; + class Map; + class MapQuickView; +} + +#include + +Q_MOC_INCLUDE("MapQuickView.h"); + +class ConfigureBasemapStyleLanguage : public QObject +{ + Q_OBJECT + + Q_PROPERTY(Esri::ArcGISRuntime::MapQuickView* mapView READ mapView WRITE setMapView NOTIFY mapViewChanged) + +public: + explicit ConfigureBasemapStyleLanguage(QObject* parent = nullptr); + ~ConfigureBasemapStyleLanguage() override; + + static void init(); + Q_INVOKABLE void setNewBasemapLanguage(bool global, const QString& language); + +signals: + void mapViewChanged(); + +private: + Esri::ArcGISRuntime::MapQuickView* mapView() const; + void setMapView(Esri::ArcGISRuntime::MapQuickView* mapView); + + Esri::ArcGISRuntime::Map* m_map = nullptr; + Esri::ArcGISRuntime::MapQuickView* m_mapView = nullptr; + Esri::ArcGISRuntime::BasemapStyleParameters* m_basemapStyleParameters = nullptr; + Esri::ArcGISRuntime::Basemap* m_basemap = nullptr; +}; + +#endif // CONFIGUREBASEMAPSTYLELANGUAGE_H diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.pro b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.pro new file mode 100644 index 0000000000..a243126af8 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.pro @@ -0,0 +1,64 @@ +#------------------------------------------------- +# Copyright 2024 Esri. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------- + +mac { + cache() +} + +#------------------------------------------------------------------------------- + +CONFIG += c++17 + +# additional modules are pulled in via arcgisruntime.pri +QT += opengl qml quick + +TEMPLATE = app +TARGET = ConfigureBasemapStyleLanguage + +ARCGIS_RUNTIME_VERSION = 200.4.0 +include($$PWD/arcgisruntime.pri) + +#------------------------------------------------------------------------------- + +HEADERS += \ + ConfigureBasemapStyleLanguage.h + +SOURCES += \ + main.cpp \ + ConfigureBasemapStyleLanguage.cpp + +RESOURCES += ConfigureBasemapStyleLanguage.qrc + +#------------------------------------------------------------------------------- + +win32 { + LIBS += \ + Ole32.lib +} + +ios { + INCLUDEPATH += $$PWD + DEPENDPATH += $$PWD + + OTHER_FILES += \ + $$PWD/Info.plist + + QMAKE_INFO_PLIST = $$PWD/Info.plist +} + +android { + INCLUDEPATH += $$PWD + DEPENDPATH += $$PWD +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qml b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qml new file mode 100644 index 0000000000..c408bb8913 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qml @@ -0,0 +1,130 @@ +// [WriteFile Name=ConfigureBasemapStyleLanguage, Category=Maps] +// [Legal] +// Copyright 2024 Esri. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// [Legal] + +import QtQuick +import QtQuick.Controls +import Esri.Samples + +Item { + + // add a mapView component + MapView { + id: view + anchors.fill: parent + + Component.onCompleted: { + // Set the focus on MapView to initially enable keyboard navigation + forceActiveFocus(); + } + } + + // Declare the C++ instance which creates the map etc. and supply the view + ConfigureBasemapStyleLanguageSample { + id: model + mapView: view + } + + Rectangle { + id: rectangle + anchors { + right: parent.right + top: parent.top + margins: 15 + } + width: column.width + height: column.height + color: Qt.rgba(0, 0, 0, 0.5) + border { + color: "black" + width: 1 + } + opacity: 0.9 + + Column { + id: column + padding: 10 + spacing: 5 + width: 300 + + Column { + id:languageStrategy + spacing: 5 + + Text { + text: "Set Language Strategy:" + font.bold: true + color: "white" + } + + Row { + RadioButton { + id: globalButton + onCheckedChanged: { + model.setNewBasemapLanguage(globalButton.checked, comboBox.currentText); + localButton.checked = !globalButton.checked + } + enabled: comboBox.currentText == "none" + } + + Text { + id: globalText + text: "Global" + height: globalButton.height + verticalAlignment: Text.AlignVCenter + color: "white" + } + } + + Row { + RadioButton { + id: localButton + checked: true + onCheckedChanged: { + model.setNewBasemapLanguage(globalButton.checked, comboBox.currentText); + globalButton.checked = !localButton.checked + } + enabled: comboBox.currentText == "none" + } + Text { + id: localText + text: "Local" + height: localButton.height + verticalAlignment: Text.AlignVCenter + color: "white" + } + } + + } + + Column { + id:specificLanguage + + Text { + text: "Set Specific Language:" + font.bold: true + color: "white" + } + + ComboBox { + id: comboBox + model: ["none" , "Bulgarian", "Greek", "Turkish"] + // onCurrentTextChanged executes when the text is changed and also initially on loading the sample + onCurrentTextChanged: model.setNewBasemapLanguage(globalButton.checked, comboBox.currentText); + } + } + } + } +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qrc b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qrc new file mode 100644 index 0000000000..2f6d2017ef --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qrc @@ -0,0 +1,11 @@ + + + README.metadata.json + ConfigureBasemapStyleLanguage.qml + ConfigureBasemapStyleLanguage.h + ConfigureBasemapStyleLanguage.cpp + main.qml + screenshot.png + README.md + + diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/Info.plist b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/Info.plist new file mode 100644 index 0000000000..58b2cc82f3 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/Info.plist @@ -0,0 +1,54 @@ + + + + + CFBundleDisplayName + ConfigureBasemapStyleLanguage + CFBundleExecutable + ConfigureBasemapStyleLanguage + CFBundleGetInfoString + ArcGIS + CFBundleIcons~ipad + + CFBundleIdentifier + com.esri.${PRODUCT_NAME:rfc1034identifier} + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NOTE + This app is cool + UIFileSharingEnabled + FALSE + UIRequiresPersistentWiFi + NO + LSRequiresIPhoneOS + + NSLocationAlwaysUsageDescription + + NSLocationWhenInUseUsageDescription + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UILaunchStoryboardName + LaunchScreen + + diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.md b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.md new file mode 100644 index 0000000000..1519beb5eb --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.md @@ -0,0 +1,42 @@ +# Configure basemap style parameters + +Apply basemap style parameters customization for a basemap, such as displaying all labels in a specific language or displaying every label in their corresponding local language. + +![](screenshot.png) + +## Use case + +When creating an application that’s used in multiple countries, basemaps can reflect the languages and cultures of the users' location. For example, if an application user is in Greece, displaying the labels on a basemap in Greek reflects the local language. Customizing the language setting on the basemap can be controlled by an application user (such as by setting preferences), or implicitly managed within the application logic (by querying the locale of the platform running the application). + +## How to use the sample + +This sample showcases the workflow of configuring basemap style parameters by displaying a basemap with labels in different languages and launches with a `Viewpoint` set over Bulgaria, Greece and Turkey, as they use three different alphabets: Cyrillic, Greek, and Latin, respectively. By default, the `BasemapStyleLanguageStrategy` is set to `LOCAL` which displays all labels in their corresponding local language. This can be changed to `GLOBAL`, which displays all labels in English. The `SpecificLanguage` setting sets all labels to a selected language and overrides the `BasemapStyleLanguageStrategy` settings. + +Pan and zoom to navigate the map and see how different labels are displayed in these countries depending on the selected `BasemapStyleLanguageStrategy` and `SpecificLanguage`: all English, all Greek, all Bulgarian, all Turkish, or each their own. + +## How it works + +1. Create a `BasemapStyleParameters` object. +2. Configure customisation preferences on the `BasemapStyleParameters` object, for instance: + * setting the `LanguageStrategy` to `BasemapStyleLanguageStrategy.LOCAL` or + * `setSpecificLanguage("el")` changes the label language to Greek. +3. The `SpecificLanguage` always overrides the `LanguageStrategy`, which means the specific language needs to be set to an empty string in order to use the language strategy. +4. Create a basemap using a `BasemapStyle` and the `BasemapStyleParameters`. +5. Assign the configured basemap to the `Map`'s `basemap` property. +6. To modify the basemap style, for example if you want to change your preferences, repeat the above steps. + +## Relevant API + +* Basemap +* BasemapStyleLanguageStrategy +* BasemapStyleParameters +* Map +* MapView + +## About the data + +The main data for this sample is the `BasemapStyle` which include basemaps that support both language localization and global language setting. The supported languages, along with their language code, can be found in the [API's documentation](https://developers.arcgis.com/rest/basemap-styles/#languages). + +## Tags + +basemap style, language, language strategy, map, point, viewpoint diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.metadata.json b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.metadata.json new file mode 100644 index 0000000000..f0ba963a34 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/README.metadata.json @@ -0,0 +1,31 @@ +{ + "category": "Maps", + "description": "Apply basemap style parameters customization for a basemap, such as displaying all labels in a specific language or displaying every label in their corresponding local language.", + "featured": false, + "ignore": false, + "images": [ + "screenshot.png" + ], + "keywords": [ + "basemap style", + "language", + "language strategy", + "map", + "point", + "viewpoint" + ], + "redirect_from": "", + "relevant_apis": [ + "Basemap", + "BasemapStyleLanguageStrategy", + "BasemapStyleParameters", + "Map", + "MapView" + ], + "snippets": [ + "ConfigureBasemapStyleLanguage.cpp", + "ConfigureBasemapStyleLanguage.h", + "ConfigureBasemapStyleLanguage.qml" + ], + "title": "Configure basemap style language" +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/arcgisruntime.pri b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/arcgisruntime.pri new file mode 100644 index 0000000000..23b71ebbe0 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/arcgisruntime.pri @@ -0,0 +1,29 @@ +#------------------------------------------------- +# Copyright 2024 Esri. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------- + +contains(QMAKE_HOST.os, Windows):{ + iniPath = $$(ALLUSERSPROFILE)\EsriRuntimeQt\ArcGIS Runtime SDK for Qt $${ARCGIS_RUNTIME_VERSION}.ini +} +else { + userHome = $$system(echo $HOME) + iniPath = $${userHome}/.config/EsriRuntimeQt/ArcGIS Runtime SDK for Qt $${ARCGIS_RUNTIME_VERSION}.ini +} +iniLine = $$cat($${iniPath}, "lines") +dirPath = $$find(iniLine, "InstallDir") +cleanDirPath = $$replace(dirPath, "InstallDir=", "") +priLocation = $$replace(cleanDirPath, '"', "") +!include($$priLocation/sdk/ideintegration/arcgis_runtime_qml_cpp.pri) { + message("Error. Cannot locate ArcGIS Runtime PRI file") +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.cpp b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.cpp new file mode 100644 index 0000000000..42e9e48ef8 --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.cpp @@ -0,0 +1,86 @@ +// Copyright 2024 Esri. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "ConfigureBasemapStyleLanguage.h" + +#include "ArcGISRuntimeEnvironment.h" + +#include +#include +#include +#include + +#ifdef Q_OS_WIN +#include +#endif + +void setAPIKey(const QGuiApplication& app, QString apiKey); + +int main(int argc, char* argv[]) +{ + QGuiApplication app(argc, argv); + app.setApplicationName(QString("ConfigureBasemapStyleLanguage - C++")); + + // Access to Esri location services requires an API key. This can be copied below or used as a command line argument. + const QString apiKey = QString(""); + setAPIKey(app, apiKey); + + // Initialize the sample + ConfigureBasemapStyleLanguage::init(); + + // Initialize application view + QQmlApplicationEngine engine; + // Add the import Path + engine.addImportPath(QDir(QCoreApplication::applicationDirPath()).filePath("qml")); + +#ifdef ARCGIS_RUNTIME_IMPORT_PATH_2 + engine.addImportPath(ARCGIS_RUNTIME_IMPORT_PATH_2); +#endif + + // Set the source + engine.load(QUrl("qrc:/Samples/Maps/ConfigureBasemapStyleLanguage/main.qml")); + + return app.exec(); +} + +// Use of Esri location services, including basemaps and geocoding, +// requires authentication using either an ArcGIS identity or an API Key. +// 1. ArcGIS identity: An ArcGIS named user account that is a member of an +// organization in ArcGIS Online or ArcGIS Enterprise. +// 2. API key: API key: a permanent key that grants access to +// location services and premium content in your applications. +// Visit your ArcGIS Developers Dashboard to create a new +// API key or access an existing API key. + +void setAPIKey(const QGuiApplication& app, QString apiKey) +{ + if (apiKey.isEmpty()) + { + // Try parsing API key from command line argument, which uses the following syntax "-k ". + QCommandLineParser cmdParser; + QCommandLineOption apiKeyArgument(QStringList{"k", "api"}, "The API Key property used to access Esri location services", "apiKeyInput"); + cmdParser.addOption(apiKeyArgument); + cmdParser.process(app); + + apiKey = cmdParser.value(apiKeyArgument); + + if (apiKey.isEmpty()) + { + qWarning() << "Use of Esri location services, including basemaps, requires" + << "you to authenticate with an ArcGIS identity or set the API Key property."; + return; + } + } + + Esri::ArcGISRuntime::ArcGISRuntimeEnvironment::setApiKey(apiKey); +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.qml b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.qml new file mode 100644 index 0000000000..c787f4414b --- /dev/null +++ b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/main.qml @@ -0,0 +1,25 @@ +// Copyright 2024 Esri. + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import QtQuick.Controls +import Esri.Samples + +ApplicationWindow { + visible: true + width: 800 + height: 600 + + ConfigureBasemapStyleLanguage { + anchors.fill: parent + } +} diff --git a/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/screenshot.png b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/screenshot.png new file mode 100644 index 0000000000..33a3d19e78 Binary files /dev/null and b/ArcGISRuntimeSDKQt_CppSamples/Maps/ConfigureBasemapStyleLanguage/screenshot.png differ diff --git a/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_CppSamples/samples.pri b/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_CppSamples/samples.pri index 6ec05aaada..66eb8bdad8 100644 --- a/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_CppSamples/samples.pri +++ b/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_CppSamples/samples.pri @@ -151,6 +151,7 @@ INCLUDEPATH += \ "$$SAMPLEPATHCPP/Maps/BrowseBuildingFloors" \ "$$SAMPLEPATHCPP/Maps/ChangeBasemap" \ "$$SAMPLEPATHCPP/Maps/ChangeViewpoint" \ + "$$SAMPLEPATHCPP/Maps/ConfigureBasemapStyleLanguage" \ "$$SAMPLEPATHCPP/Maps/CreateAndSaveMap" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocation" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocationWithNmeaDataSources" \ @@ -368,6 +369,7 @@ HEADERS += \ "$$SAMPLEPATHCPP/Maps/BrowseBuildingFloors/BrowseBuildingFloors.h" \ "$$SAMPLEPATHCPP/Maps/ChangeBasemap/ChangeBasemap.h" \ "$$SAMPLEPATHCPP/Maps/ChangeViewpoint/ChangeViewpoint.h" \ + "$$SAMPLEPATHCPP/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.h" \ "$$SAMPLEPATHCPP/Maps/CreateAndSaveMap/CreateAndSaveMap.h" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocation/DisplayDeviceLocation.h" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocationWithNmeaDataSources/DisplayDeviceLocationWithNmeaDataSources.h" \ @@ -588,6 +590,7 @@ SOURCES += \ "$$SAMPLEPATHCPP/Maps/BrowseBuildingFloors/BrowseBuildingFloors.cpp" \ "$$SAMPLEPATHCPP/Maps/ChangeBasemap/ChangeBasemap.cpp" \ "$$SAMPLEPATHCPP/Maps/ChangeViewpoint/ChangeViewpoint.cpp" \ + "$$SAMPLEPATHCPP/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.cpp" \ "$$SAMPLEPATHCPP/Maps/CreateAndSaveMap/CreateAndSaveMap.cpp" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocation/DisplayDeviceLocation.cpp" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocationWithNmeaDataSources/DisplayDeviceLocationWithNmeaDataSources.cpp" \ @@ -801,6 +804,7 @@ RESOURCES += \ "$$SAMPLEPATHCPP/Maps/BrowseBuildingFloors/BrowseBuildingFloors.qrc" \ "$$SAMPLEPATHCPP/Maps/ChangeBasemap/ChangeBasemap.qrc" \ "$$SAMPLEPATHCPP/Maps/ChangeViewpoint/ChangeViewpoint.qrc" \ + "$$SAMPLEPATHCPP/Maps/ConfigureBasemapStyleLanguage/ConfigureBasemapStyleLanguage.qrc" \ "$$SAMPLEPATHCPP/Maps/CreateAndSaveMap/CreateAndSaveMap.qrc" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocation/DisplayDeviceLocation.qrc" \ "$$SAMPLEPATHCPP/Maps/DisplayDeviceLocationWithNmeaDataSources/DisplayDeviceLocationWithNmeaDataSources.qrc" \ diff --git a/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_Samples/mainSample.cpp b/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_Samples/mainSample.cpp index a2cbdbf24f..8643db3199 100644 --- a/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_Samples/mainSample.cpp +++ b/ArcGISRuntimeSDKQt_SampleViewers/ArcGISRuntimeSDKQt_Samples/mainSample.cpp @@ -93,6 +93,7 @@ #include "ChooseCameraController.h" #include "ClipGeometry.h" #include "ClosestFacility.h" +#include "ConfigureBasemapStyleLanguage.h" #include "ConfigureClusters.h" #include "ConfigureSubnetworkTrace.h" #include "ContingentValues.h" @@ -408,6 +409,7 @@ void registerCppSampleClasses() ChooseCameraController::init(); ClipGeometry::init(); ClosestFacility::init(); + ConfigureBasemapStyleLanguage::init(); ConfigureClusters::init(); ConfigureSubnetworkTrace::init(); ContingentValues::init();