Git Product home page Git Product logo

android-drive-route-plan's Introduction

android-drive-route-plan

驾车路径规划示例

前述

使用方法##

###1:配置搭建AndroidSDK工程###

扫一扫安装##

Screenshot

示例效果##

  • overlay效果展示

Screenshot

  • 列表效果展示

Screenshot

核心类/接口

接口 说明 版本
RouteSearch calculateDriveRouteAsyn() 根据指定的参数计算驾车路径、异步方法 V2.1.0
RouteSearch onDriveRouteSearched() 驾车路径规划结果的回调方法 V2.1.0

核心难点

 - 构造路径规划类

      mRouteSearch = new RouteSearch(this);
      mRouteSearch.setRouteSearchListener(this);

 -发起路径规划异步请求

  mRouteSearch.calculateDriveRouteAsyn(query)

 - 将驾车路径规划结果用overlay在地图展现

      DrivingRouteOverlay drivingRouteOverlay = new DrivingRouteOverlay(
              mContext, aMap, drivePath,
              mDriveRouteResult.getStartPos(),
              mDriveRouteResult.getTargetPos(), null);
      drivingRouteOverlay.setNodeIconVisibility(false);//设置节点marker是否显示
      drivingRouteOverlay.setIsColorfulline(true);//是否用颜色展示交通拥堵情况,默认true
      drivingRouteOverlay.removeFromMap();
      drivingRouteOverlay.addToMap();
      drivingRouteOverlay.zoomToSpan();

android-drive-route-plan's People

Contributors

music1983 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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