You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.5 KiB

//
// AMapUtility.h
// AMapFoundation
//
// Created by xiaoming han on 15/10/27.
// Copyright © 2015年 Amap. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
//工具方法
/**
* @brief nil则返回空字符串
*/
FOUNDATION_STATIC_INLINE NSString * AMapEmptyStringIfNil(NSString *s)
{
return s ? s : @"";
}
///坐标类型枚举
typedef NS_ENUM(NSInteger, AMapCoordinateType)
{
AMapCoordinateTypeAMap = -1, ///<AMap
AMapCoordinateTypeBaidu = 0, ///<Baidu
AMapCoordinateTypeMapBar, ///<MapBar
AMapCoordinateTypeMapABC, ///<MapABC
AMapCoordinateTypeSoSoMap, ///<SoSoMap
AMapCoordinateTypeAliYun, ///<AliYun
AMapCoordinateTypeGoogle, ///<Google
AMapCoordinateTypeGPS, ///<GPS
};
/**
* @brief
* @param coordinate
* @param type
* @return
*/
FOUNDATION_EXTERN CLLocationCoordinate2D AMapCoordinateConvert(CLLocationCoordinate2D coordinate, AMapCoordinateType type);
/**
* @brief
* @param coordinate
* @return YES:NO:
*/
FOUNDATION_EXTERN BOOL AMapDataAvailableForCoordinate(CLLocationCoordinate2D coordinate);