GithubHelp home page GithubHelp logo

arancepete / arcgis-maps-sdk-samples-qt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esri/arcgis-maps-sdk-samples-qt

0.0 0.0 0.0 244.26 MB

ArcGIS Maps SDK for Qt Samples

License: Apache License 2.0

Ruby 0.02% C++ 44.59% Python 0.32% C 0.02% QML 33.90% QMake 21.13% Dockerfile 0.02%

arcgis-maps-sdk-samples-qt's Introduction

ArcGIS Maps SDK for Qt Samples

Overview

The repo contains Qt projects for each sample that can be run from within the Qt Creator IDE. It also contians source code to build and run the C++ and QML sample viewer apps locally.

Table of Contents

  1. Prerequisites
  2. Set up the ArcGIS Maps SDK for Qt samples repo locally
  3. Open a sample project file in Qt Creator
  4. Build and run the ArcGIS Maps SDK for Qt Sample Viewers locally
  5. Use a previous version
  6. Use offline data in the samples
  7. Resources
  8. Issues
  9. Contributing
  10. Licensing

Prerequisites

Set up the ArcGIS Maps SDK for Qt samples repo locally

Fork the repo

If you haven't already, fork the repo.

Clone the repo

How to clone a forked repository

Clone the sample code repo

Open your terminal, navigate to your working directory, use git clone to get a copy of the repo.

# Clone your fork of the repository into the current directory in terminal
git clone https://github.com/YOUR_USERNAME/arcgis-maps-sdk-samples-qt.git

Clone the toolkit repo

Change directory into your locally cloned samples repo and then use git clone to get a copy of the ArcGIS Maps SDK for Qt Toolkit.

# Change directory to the clone of the samples repository
# Clone the toolkit repository into the current directory in terminal
cd /arcgis-maps-sdk-samples-qt
git clone https://github.com/Esri/arcgis-maps-sdk-toolkit-qt.git

Cloning the toolkit in this location will allow for the samples to automatically pick it up. If you wish to place the toolkit in another location, you will need to update the samples project file accordingly to locate the necessary .pri file.

Configure remote upstream for your fork

To sync changes you make in a fork with this repository, you must configure a remote that points to the upstream repository in Git.

  • Open a terminal (Mac users) or command prompt (Windows & Linux users)
  • List the current configured remote repository for your fork
$ git remote -v
origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-samples-qt.git (fetch)
origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-samples-qt.git (push)
  • Specify a new remote upstream repository
git remote add upstream https://github.com/Esri/arcgis-maps-sdk-samples-qt.git
  • Verify the new upstream repository
$ git remote -v

origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-samples-qt.git (fetch)
origin https://github.com/YOUR_USERNAME/arcgis-maps-sdk-samples-qt.git (push)
upstream https://github.com/Esri/arcgis-maps-sdk-samples-qt.git (fetch)
upstream https://github.com/Esri/arcgis-maps-sdk-samples-qt.git (push)

Sync your fork

Once you have set up a remote upstream you can keep your fork up to date with our samples repository by syncing your fork.

  • Open a terminal (Mac users) or command prompt (Windows & Linux users)
  • Change to the current working directory of your local repository
  • Fetch the branches and commits from the upstream repository. Commits to main will be stored in a local branch, upstream/main.
git fetch upstream
  • Check out your forks local main branch
git checkout main
  • Merge changes from upstream/main into your local main branch which syncs your forks main branch with our samples repository.
git merge upstream/main

Open a sample project file in Qt Creator

Start Qt Creator. When the IDE opens to the Welcome screen, click on the Open Project button and browse to a project file (.pro) within your forked repo location. Configure the project, set your ArcGIS Developer API key in main.cpp, and run the sample.

Build and run the ArcGIS Maps SDK for Qt Sample Viewers locally

Start Qt Creator. When the IDE opens to the Welcome screen, click on the Open Project button and browse to either sample viewer's project file (.pro) within your forked repo location. The sample viewer project files are located at arcgis-maps-sdk-samples-qt\ArcGISRuntimeSDKQt_SampleViewers\, in either ArcGISRuntimeSDKQt_CppSamples or ArcGISRuntimeSDKQt_QMLSamples. Configure the project, set your ArcGIS Developer API key in ArcGISRuntimeSDKQt_Samples\SampleManager.cpp, and run the sample.

NOTE: the sample viewer project files search for the toolkit.pri at the default location specified above. If you cloned the toolkit repo to a different location, you will need to update the path in the respective sample viewer's project file.

Use a previous version

The main branch contains samples for the current, most up-to-date version of ArcGIS Maps SDK. To access previous versions, you can checkout by a tag or commit, or alternativley you can download the source zip: https://github.com/Esri/arcgis-maps-sdk-samples-qt/releases.

Use offline data in the samples

Some of the samples consume offline data, including TPKs, VTPKs, mobile geodatabases, and mobile map packages, among other data formats. If the sample does consume offline data, the sample's associated readme.md will note where you can download the data (from ArcGIS Online), and where the data can be placed once downloaded. For example, it may say something like:

Link Local Location
Los Angeles Vector Tile Package <userhome>/ArcGIS/Runtime/Data/vtpk/LosAngeles.vtpk

In this case, you would download the VTPK from the ArcGIS Online Location, and place it in a specified location. This location is the path returned by QStandardPaths::writableLocation(QStandardPaths::HomeLocation) from the Qt QStandardPaths class. <userhome> is used throughout to denote a generic location on the different platforms. The below table specifies where this is on all of the supported platforms:

Platform Userhome Location Example Location
Windows %userprofile% C:\Users\Bob\ArcGIS\Runtime\Data
Linux ~ /users/bob/ArcGIS/Runtime/Data
Mac OS X ~ /Users/Bob/ArcGIS/Runtime/Data
Android <APPROOT>/files <APPROOT>/files/ArcGIS/Runtime/Data
iOS <your app bundle> <appbundle>/ArcGIS/Runtime/Data

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2020 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.

A copy of the license is available in the repository's license.txt file

arcgis-maps-sdk-samples-qt's People

Contributors

ldanzinger avatar jared-2016 avatar lsmallwood avatar ryankim86 avatar khajra avatar anmacdonald avatar jamesmballard avatar tdunn avatar sbiswas96 avatar nandinirao avatar guillaumebelz avatar ryankim923 avatar donmoja avatar tanneryould avatar ecmorris avatar markjdugger avatar mfeigl avatar thadt avatar noahmulfinger avatar aji13187 avatar chrisfrenchpdx avatar acmorris avatar patrickarlt avatar mikewilburn avatar dian9181 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.