using System;
|
using Shared.IOS.TBL;
|
|
namespace Shared
|
{
|
public static class GDMapKit
|
{
|
public static void Show(Action<double , double, int, string> action, string titleName = "", string saveName = "保存", bool bSetHome = false, double mLatitude = 0.0, double mLongitude = 0.0, int mRadius = 500)
|
{
|
|
|
GDMapViewController mGDMapViewController = new GDMapViewController();
|
|
mGDMapViewController.TitleName = titleName;
|
mGDMapViewController.Gd_save = saveName;
|
|
mGDMapViewController.MSaveButtonCallBack += (mmLatitude, mmLongitude, mmRadius, addressName) =>
|
{
|
action?.Invoke(mmLatitude, mmLongitude, mmRadius, addressName);
|
};
|
|
|
Application.currentVC.NavigationController.PushViewController(mGDMapViewController, true);
|
|
|
if (bSetHome && (mLatitude != 0.0) && (mLongitude != 0.0))
|
{
|
//mGDMapViewController.MRadius = mRadius;
|
mGDMapViewController.SetmHomeCoordinate(mLatitude, mLongitude, mRadius);
|
Shared.HDLUtils.WriteLine("GDMapKitShow: " + mLongitude + "-" + mLatitude);
|
}
|
|
}
|
|
|
public static void setGDApiKey(string KEY)
|
{
|
|
AMapServices.SharedServices.ApiKey = KEY;
|
|
}
|
}
|
}
|