Giter Club home page Giter Club logo

gdirectionsapiutils's Introduction

GDirectionsApiUtils

This project aims to simplify the usage of the Google Map Direction Rest Api This project is done to help you using the Google Rest Api Direction : http://maps.googleapis.com/maps/api/directions/json?

How it works, definitly simply. You download the jar (gdirectionsapiutils.jar under GDirectionsApiUtils\bin\ ) in the libs folder of your application (under bin) and use it:

    public class MainActivity extends ActionBarActivity implements DCACallBack{
    /**
     * Get the Google Direction between mDevice location and the touched location using the     Walk
     * @param point
     */
    private void getDirections(LatLng point) {
         GDirectionsApiUtils.getDirection(mDcaCallBack, startPoint, endPoint,     GDirectionsApiUtils.MODE_WALKING);
    }

    /*
     * The callback
     * When the direction is built from the google server and parsed, this method is called and give you the expected direction
     */
    @Override
    public void onDirectionLoaded(List<GDirection> directions) {        
        // Display the direction or use the DirectionsApiUtils
        for(GDirection direction:directions) {
            Log.e("MainActivity", "onDirectionLoaded : Draw GDirections Called with path " + directions);
            GDirectionsApiUtils.drawGDirection(direction, mMap);
        }
    }

gdirectionsapiutils's People

Contributors

mathiasseguy-android2ee avatar ffournier avatar

Watchers

James Cloos avatar Saoud Nidhal 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.