tripmodule


License

License

GroupId

GroupId

com.amap.api
ArtifactId

ArtifactId

tripmodule
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

aar
Description

Description

tripmodule
tripmodule
Project URL

Project URL

https://github.com/amap-demo/android-trip-search
Source Code Management

Source Code Management

https://github.com/amap-demo/android-trip-search

Download tripmodule

How to add to project

<!-- https://jarcasting.com/artifacts/com.amap.api/tripmodule/ -->
<dependency>
    <groupId>com.amap.api</groupId>
    <artifactId>tripmodule</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.amap.api/tripmodule/
implementation 'com.amap.api:tripmodule:1.0.1'
// https://jarcasting.com/artifacts/com.amap.api/tripmodule/
implementation ("com.amap.api:tripmodule:1.0.1")
'com.amap.api:tripmodule:aar:1.0.1'
<dependency org="com.amap.api" name="tripmodule" rev="1.0.1">
  <artifact name="tripmodule" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.amap.api', module='tripmodule', version='1.0.1')
)
libraryDependencies += "com.amap.api" % "tripmodule" % "1.0.1"
[com.amap.api/tripmodule "1.0.1"]

Dependencies

compile (2)

Group / Artifact Type Version
com.android.support » appcompat-v7 jar 25.1.0
com.android.support.constraint » constraint-layout jar 1.0.0-beta4

Project Modules

There are no modules declared in this project.

android-trip-search

出行类app结合了叫车主页和检索的demo

前述

配置搭建AndroidSDK工程

使用场景

AMapTripModule 提供了叫车主页的组件

组件截图

gradle中引入AmapPoiSearchModule和AMapTripModule

settings.gradle 配置

include ':app'

include ':AMapTripModule'
project(":AMapTripModule").projectDir=new File("AMapTripModule路径")

//you can include the AmapPoiSearchModule if you'd like to DIY
// AmapPoiSearchModule的下载地址:https://github.com/amap-demo/android-poisearch-demo
//include ':AmapPoiSearchModule'
//project(":AmapPoiSearchModule").projectDir = new File("AmapPoiSearchModule路径")

build.gradle 配置

dependencies {

    .......

    
    compile 'com.amap.api:tripmodule:1.0.0'
    compile 'com.amap.api:poisearchmodule:1.1.0'

    compile 'com.amap.api:3dmap:latest.integration'
    compile 'com.amap.api:search:latest.integration'
    compile 'com.amap.api:location:latest.integration'
    compile 'com.google.code.gson:gson:2.8.0'
    .......
}

使用方法

此处以MainActivity为例进行介绍:

step1. 在onCreate中初始化Widget和ModuleDelegte

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        RelativeLayout contentView = (RelativeLayout)findViewById(R.id.content_view);

        mTripHostDelegate = new TripHostModuleDelegate();
        mTripHostDelegate.bindParentDelegate(mParentTripDelegate);

        contentView.addView(mTripHostDelegate.getWidget(this));
        mTripHostDelegate.onCreate(savedInstanceState);
    }

step2. 在TripHostModuleDelegate.IParentDelegate进行回调逻辑

 private IParentDelegate mParentTripDelegate = new IParentDelegate() {
        @Override
        public void onStartCall() {
            showMsg("on start call");
        }
    };
......
com.amap.api

AMAP-Demo

高德开放平台示例中心

Versions

Version
1.0.1
1.0.0