Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
Androidapi.JNI.baidu.location.pas
Androidapi.JNI.baidu.mapapi.bikenavi.pas
Androidapi.JNI.baidu.mapapi.cloud.pas
Androidapi.JNI.baidu.mapapi.favorite.pas
Androidapi.JNI.baidu.mapapi.map.pas
Androidapi.JNI.baidu.mapapi.model.pas
Androidapi.JNI.baidu.mapapi.navi.pas
Androidapi.JNI.baidu.mapapi.pas
Androidapi.JNI.baidu.mapapi.radar.pas
Androidapi.JNI.baidu.mapapi.search.pas
Androidapi.JNI.baidu.mapapi.utils.pas
Androidapi.JNI.baidu.navisdk.pas
BaiduMapAPI.LocationService.Android.pas
BaiduMapAPI.LocationService.iOS.pas
BaiduMapAPI.LocationService.pas
BaiduMapAPI.NaviService.Android.pas
BaiduMapAPI.NaviService.CommTypes.pas
BaiduMapAPI.NaviService.iOS.pas
BaiduMapAPI.NaviService.pas
BaiduMapAPI.PoiSearchService.Android.pas
BaiduMapAPI.PoiSearchService.iOS.pas
BaiduMapAPI.PoiSearchService.pas
BaiduMapAPI.RoutePlanSearchService.Android.pas
BaiduMapAPI.RoutePlanSearchService.pas
BaiduMapAPI.SDKInitializer.pas
BaiduMapAPI.Search.CommTypes.pas
BaiduMapAPI.ViewService.Android.pas
BaiduMapAPI.ViewService.iOS.pas
BaiduMapAPI.ViewService.pas
FMX.CallUIThread.Helper.Android.pas
README.md
iOSapi.AVFoundation.Helper.pas
iOSapi.BaiduMapAPI_Base.pas
iOSapi.BaiduMapAPI_Location.pas
iOSapi.BaiduMapAPI_Map.pas
iOSapi.BaiduMapAPI_Navi.pas
iOSapi.BaiduMapAPI_Search.pas
iOSapi.BaiduMapAPI_Utils.pas

README.md

一、文件介绍:

1.SDK接口文件

安卓:以Androidapi.JNI.baidu.mapapi 开头的文件为安卓SDK jar的接口文件(谢谢老猫提供的工具)。

iOS:以iOSapi.BaiduMapAPI_ 开头的文件为iOS SDK Framework 的接口文件。

2.SDK功能实现文件

BaiduMapAPI.SDKInitializer 初始化SDK 服务
BaiduMapAPI.Search.CommTypes 搜索服务公共单元
BaiduMapAPI.ViewService 地图服务
   |--BaiduMapAPI.ViewService.iOS iOS平台地图服务
   |--BaiduMapAPI.ViewService.Android 安卓平台地图服务
BaiduMapAPI.LocationService 定位服务
   |--BaiduMapAPI.LocationService.iOS iOS平台定位服务
   |--BaiduMapAPI.LocationService.Android 安卓平台地定位服务
BaiduMapAPI.PoiSearchService 兴趣点搜索服务
   |--BaiduMapAPI.PoiSearchService .iOS iOS平台兴趣点搜索服务
   |--BaiduMapAPI.PoiSearchService .Android 安卓平台兴趣点搜索服务
BaiduMapAPI.NaviService 导航服务
   |--BaiduMapAPI.NaviService.CommTypes 导航服务公共单元
   |--BaiduMapAPI.ViewService.iOS iOS平台导航服务
   |--BaiduMapAPI.ViewService.Android 安卓平台导航服务

二、使用说明

1.初始化SDK(无论使用SDK什么功能必须先初始化SDK)

引用单元:BaiduMapAPI.SDKInitializer
示例代码:

TSDKInitializer.SDKInit(Your App Key);

2.地图的展示

引用单元:BaiduMapAPI.ViewService
示例代码:

Var
    BaiduMapView:TBaiduMapView.
    BaiduMapView := TBaiduMapView.Create(Self);
    BaiduMapView.Parent := Self;
    BaiduMapView.Align := TAlignLayout.Client;
    BaiduMapView.ShowBaiduMap;

3.定位

引用单元:BaiduMapAPI.LocationService
示例代码:

Var
    BaiduMapLocation :TBaiduMapLocation;
BaiduMapLocation := TBaiduMapLocation.Create;
BaiduMapLocation.LocationService.OnUserLocationWillChanged := 				DoUserLocationChanged;
BaiduMapLocation.LocationService.InitLocation;
BaiduMapLocation.LocationService.StopLocation;
BaiduMapLocation.LocationService.StarLocation;

说明:当用户位置发生变化后,会主动触发OnUserLocationWillChanged

4.兴趣点搜索

兴趣点搜索有:范围内检索、城市内检索、附近检索三种模式
引用单元:BaiduMapAPI.PoiSearchService
示例代码:

Var
  Option:TPoiSearchrOption;
  BaiduMapPoiSearch:TBaiduMapPoiSearch;
begin
  BaiduMapPoiSearch:=TBaiduMapPoiSearch.Create;
  //城市类检索
  Option:=TPoiCitySearchOption.Create;
  TPoiCitySearchOption(Option).Keyword:='机场';
  TPoiCitySearchOption(Option).City:='重庆';
  TPoiCitySearchOption(Option).PageCapacity:=10;
  TPoiCitySearchOption(Option).PageNum:=0;
  TPoiCitySearchOption(Option).IsReturnAddr:=True;
  BaiduMapPoiSearch.PoiSearchService.OnGetPoiResult := DoGetPoiResult;
  BaiduMapPoiSearch.PoiSearchService.PoiSearch(Option);
  Option.Free;

说明:检索成功后,会回调OnGetPoiResult

Bug联系:

Email:371889755@qq.com
Tel:18523843322