Giter Club home page Giter Club logo

atlas's Introduction

Atlas - Titanium Geolocation Utilities and Providers

Atlas is a set of CommonJS JavaScript libraries that allow you to extend the existing Appcelerator Titanium mobile Geolocation functions.

Features

The Altas project is divided into two main sections. The core and the providers (Google, GeoNames,Titanium)

Altas core provides help Geolocation functions for working with your device and coordinates.

The Altas providers, location in the Resources/lib folder provides Reverse Geo and Forward Geo functionality using such provides as GeoNames, Google, and Titanium. All provides are implemented using a common interface so you can quickly switch between them in your code.

You can use the Altas core provider methods to manage what providers are loaded and change them together in case one service is unavailable or has reached it's limit.

Usage

To use Atlas in your Titanium Mobile project please follow the below steps:

  1. Check out the Examples folder for how to use each provider. Similar to the KitchenSink example there is a running sample on how to use each provider.
  2. Some of the providers need API keys. Check the readme file in each provider directory for instructions on what is needed for each provider.
  3. Copy the providers into your project and use them just like any other CommonJS library

Altas Core

First load the library var Altas = require('Altas/atlas');

How you have access to the following objects Altas.Math, Altas.Shapes, and Altas.Geo

Altas.Math gives you some common Geo calculations including:

  • addDistance2Coords - calculates a new set of coordinates based on your bearing and the distance you want to travel

  • distanceBetweenCoords - calculates the distance between two coordinates

  • bearing - calculates your bearing given a set of coordinates

  • midPoint - calculates the midpoint between two sets of coordinates

  • meters2Miles - converts meters to miles

  • miles2Meters - converts miles to meters

Altas.Shapes gives you access to geolocation shapes including:

  • createSqArea - generates the square area between to sets of coordinates.

Altas.Geo gives you some common Geolocation functions including:

  • enabled - returns a boolean if geolocation services are accessible on your device

  • getCurrentHeading - provides your heading information to a callback function. This wraps the native Titanium functions

  • getCurrentCoordinates - provides your coordinates information to a callback function. This wraps the native Titanium functions

CommonJS Libraries

All commonjs files are in the Resources/Altas project folder.

  • Atlas Core (Resources/Altas/atlas.js)

  • Titanium Location Provider (Resources/Altas/Titanium/altas.ti.js)

  • GeoNames Location Provider (Resources/Altas/GeoNames/altas.geonames.js)

  • Google Location Provider (Resources/Altas/Google/altas.google.js)

Please check each provider's directory for information on the provider and where to obtain any API Keys

Issues

Please report all issues on the GitHub issue tracker for Atlas.

Authors

License

Project Atlas is licensed under the terms of the Apache Public License. Please see the LICENSE included with this distribution for details.

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.