Skip to content

crash-wu/SGLocationObjC

Repository files navigation

SGLocationObjC

CI Status Version License Platform

Describe

基于ArcGis加载天地图瓦片的定位功能

Usage

@import SGLocationObjC;//到项目中

###SGLocationUtil


/**
 *  @author crash         crash_wu@163.com   , 16-09-05 16:09:02
 *
 *  @brief  单例
 *
 *  @return 定位服务对象
 */
+(nonnull instancetype)sharedInstance;

/**
 *  @author crash         crash_wu@163.com   , 16-09-05 16:09:31
 *
 *  @brief  获取用户当前位置信息,并且展示到地图上
 *
 *  @param mapView   地图
 *  @param imageName 图标名称
 */
-(void)getUserLocation:(nonnull AGSMapView *)mapView andSymbolImage:(nonnull NSString *)imageName;

/**
 *  @author crash         crash_wu@163.com   , 16-09-05 16:09:29
 *
 *  @brief  获取当前用户用户位置坐标
 *
 *  @return 用户位置坐标
 */
-(nullable AGSPoint *)getUserPoint;

/**
获取当前位置

@param success 获取当前位置成功
@param failed 获取当前位置失败
*/
-(void)getUserLocationWith:
(nonnull void (^)(CLLocation  *_Nullable location))success failed:
(nonnull void(^)(NSError *_Nullable error))failed;

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

ArcGIS-Runtime-SDK-iOS for version 10.2.5

Installation

SGLocationObjC is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "SGLocationObjC"

Author

吴小星, crash_wu@163.com

License

SGLocationObjC is available under the MIT license. See the LICENSE file for more info.