Giter VIP home page Giter VIP logo

windows-appsample-trafficapp's Introduction

Traffic App sample - traditional version

Note: This branch of the repo contains the original version of the sample, which uses a traditional "code-behind" architecture. For the Model-View-ViewModel (MVVM) version, see the MVVM branch.

Traffic App is a sample Universal Windows Platform (UWP) app for commuters to track drive times to various locations. The user adds frequently-visited destinations using app-bar buttons or by tapping and holding on the map. Traffic App then provides a quick view into how long it will take to drive to each place from the user’s current location, following the fastest route. The user can also flag a particular destination and a background task will periodically monitor traffic to that location, alerting the user when traffic is adding ten minutes or more to the travel time.

For a description of the goals and challenges of this project, see the project overview.

Traffic app screenshot

Features

Traffic App highlights the following APIs:

Universal Windows Platform development

This sample requires Visual Studio 2015 and the Windows Software Development Kit (SDK) for Windows 10.

Get a free copy of Visual Studio 2015 Community Edition with support for building Universal Windows apps

Additionally, to be informed of the latest updates to Windows and the development tools, join the Windows Insider Program.

Running the sample

Traffic App needs a Bing Maps key to run with full functionality. For security reasons, we can't provide a key as part of the sample - you'll need to get your own at https://www.bingmapsportal.com. Once you have a key, insert it into code in the LocationHelper class constructor and in the MapControl element in MainPage.xaml (you can find these easily by searching the solution for "ServiceToken").

Note: The platform target currently defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

The default project is TrafficApp and you can Start Debugging (F5) or Start Without Debugging (Ctrl+F5) to try it out. The app will run in the emulator or on physical devices. If you run in the emulator, be sure to set your location in the location area of the emulator - otherwise, the app won't work correctly.

By default, the app generates four sample locations at random positions around your current location. You can switch to "live mode" instead by changing the commented lines in MainPage.OnNavigatedTo so that locations are loaded from roaming storage.

Code at a glance

If you’re just interested in code snippets for certain API and don’t want to browse or run the full sample, check out the following files for examples of some highlighted features:

windows-appsample-trafficapp's People

Contributors

capfei avatar karlerickson avatar

Watchers

 avatar  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.