立得地图iOS SDK 地图&搜索服务参考手册 V1.7.0
| 宏定义 | 函数 | 变量
LMKGeometry.h 文件参考
#import <CoreGraphics/CoreGraphics.h>
#import <CoreLocation/CoreLocation.h>
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

浏览源代码.

struct   LMKMapPoint
  地图投影点,用平面直角坐标表示(20级像素坐标)。 更多...
 
struct   LMKMapSize
  平面投影大小结构定义 更多...
 
struct   LMKMapRect
  平面投影矩形结构定义 更多...
 
struct   LMKCoordinateBounds
  经纬度范围 更多...
 
struct   LMKCoordinateSpan
  表示一个经纬度跨度 更多...
 
struct   LMKCoordinateRegion
  经纬度区域 更多...
 

宏定义

#define  __LMK_GEOMETRY__H_
 

函数

typedef  NS_ENUM (NSUInteger, LMKMapProjectionType)
  地图投影类型,支持墨卡托投影和4326投影 更多...
 
static LMKCoordinateBounds  LMKCoordinateBoundsMake (CLLocationCoordinate2D northEast, CLLocationCoordinate2D southWest)
 
static LMKCoordinateSpan  LMKCoordinateSpanMake (CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta)
 
static LMKCoordinateRegion  LMKCoordinateRegionMake (CLLocationCoordinate2D centerCoordinate, LMKCoordinateSpan span)
 
LMKMapPoint  LMKMapPointForCoordinate (CLLocationCoordinate2D coordinate, LMKMapProjectionType projectionType)
  经纬度坐标转平面投影坐标 更多...
 
CLLocationCoordinate2D  LMKCoordinateForMapPoint (LMKMapPoint mapPoint, LMKMapProjectionType projectionType)
  平面投影坐标转经纬度坐标 更多...
 
CLLocationCoordinate2D *  LMKCoordinatesForCoordinateString (NSString *coornaditeStr, NSUInteger *count)
  字符串坐标转经纬度坐标 更多...
 
int *  LMKCoordinatePointsForCoordinateString (NSString *coornaditeStr, int *count)
  字符串坐标转经纬度点坐标 更多...
 
LMKMapRect  mapRectForMapPoints (NSArray *pointArray)
  平面投影点集合所属的平面范围 更多...
 
LMKMapRect  LMKMapRectUnion (LMKMapRect rect1, LMKMapRect rect2)
  合并两个LMKMapRect 更多...
 
static LMKMapPoint  LMKMapPointMake (double x, double y)
 
static LMKMapSize  LMKMapSizeMake (double width, double height)
 
static LMKMapRect  LMKMapRectMake (double x, double y, double width, double height)
 
static LMKMapPoint  LMKGetMapRectCenter (LMKMapRect mapRect)
 
static double  LMKMapRectGetMinX (LMKMapRect rect)
 
static double  LMKMapRectGetMinY (LMKMapRect rect)
 
static double  LMKMapRectGetMidX (LMKMapRect rect)
 
static double  LMKMapRectGetMidY (LMKMapRect rect)
 
static double  LMKMapRectGetMaxX (LMKMapRect rect)
 
static double  LMKMapRectGetMaxY (LMKMapRect rect)
 
static double  LMKMapRectGetWidth (LMKMapRect rect)
 
static double  LMKMapRectGetHeight (LMKMapRect rect)
 
BOOL  LMKMapRectIntersectsRect (LMKMapRect rect1, LMKMapRect rect2)
 
double  LMKMapPointsPerMeterAtLatitude (CLLocationDegrees latitude, LMKMapProjectionType projectionType)
  1米对应的投影 更多...
 
CLLocationDistance  LMKMetersBetweenLocations (CLLocationCoordinate2D coord1, CLLocationCoordinate2D coord2)
  经纬度两点之间的距离 更多...
 

变量

const LMKMapSize  LMKMapSizeWorld
 
const LMKMapRect  LMKMapRectWorld
 
const LMKMapRect  LMKMapRectZero
 

宏定义说明

#define __LMK_GEOMETRY__H_

函数说明

static LMKCoordinateBounds LMKCoordinateBoundsMake ( CLLocationCoordinate2D  northEast,
CLLocationCoordinate2D  southWest 
)
inlinestatic
CLLocationCoordinate2D LMKCoordinateForMapPoint ( LMKMapPoint  mapPoint,
LMKMapProjectionType  projectionType 
)

平面投影坐标转经纬度坐标

参数
mapPoint 要转化的平面投影坐标
projectionType 投影类型 投影类型,0:墨卡托,1:4326
返回
经纬度坐标
int* LMKCoordinatePointsForCoordinateString ( NSString *  coornaditeStr,
int *  count 
)

字符串坐标转经纬度点坐标

参数
coornaditeStr 要转化的字符串坐标
count 返回坐标点的个数
返回
经纬度点坐标,内部malloc 需要外部释放 free,比实际的点多了一个(两个int大小)
static LMKCoordinateRegion LMKCoordinateRegionMake ( CLLocationCoordinate2D  centerCoordinate,
LMKCoordinateSpan  span 
)
inlinestatic
CLLocationCoordinate2D* LMKCoordinatesForCoordinateString ( NSString *  coornaditeStr,
NSUInteger *  count 
)

字符串坐标转经纬度坐标

参数
coornaditeStr 要转化的字符串坐标
count 返回坐标点的个数
返回
经纬度坐标,内部malloc 需要外部释放 free
static LMKCoordinateSpan LMKCoordinateSpanMake ( CLLocationDegrees  latitudeDelta,
CLLocationDegrees  longitudeDelta 
)
inlinestatic
static LMKMapPoint LMKGetMapRectCenter ( LMKMapRect  mapRect )
inlinestatic
LMKMapPoint LMKMapPointForCoordinate ( CLLocationCoordinate2D  coordinate,
LMKMapProjectionType  projectionType 
)

经纬度坐标转平面投影坐标

参数
coordinate 要转化的经纬度坐标
projectionType 投影类型
返回
平面投影坐标
static LMKMapPoint LMKMapPointMake ( double  x,
double  y 
)
inlinestatic
double LMKMapPointsPerMeterAtLatitude ( CLLocationDegrees  latitude,
LMKMapProjectionType  projectionType 
)

1米对应的投影

参数
latitude 纬度
projectionType 投影类型
返回
1米对应的投影像素点坐标
static double LMKMapRectGetHeight ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMaxX ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMaxY ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMidX ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMidY ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMinX ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetMinY ( LMKMapRect  rect )
inlinestatic
static double LMKMapRectGetWidth ( LMKMapRect  rect )
inlinestatic
BOOL LMKMapRectIntersectsRect ( LMKMapRect  rect1,
LMKMapRect  rect2 
)
static LMKMapRect LMKMapRectMake ( double  x,
double  y,
double  width,
double  height 
)
inlinestatic
LMKMapRect LMKMapRectUnion ( LMKMapRect  rect1,
LMKMapRect  rect2 
)

合并两个LMKMapRect

static LMKMapSize LMKMapSizeMake ( double  width,
double  height 
)
inlinestatic
CLLocationDistance LMKMetersBetweenLocations ( CLLocationCoordinate2D  coord1,
CLLocationCoordinate2D  coord2 
)

经纬度两点之间的距离

参数
coord1 坐标1
coord2 坐标2
返回
经纬度两点之间的距离
LMKMapRect mapRectForMapPoints ( NSArray *  pointArray )

平面投影点集合所属的平面范围

参数
pointArray 平面坐标点
返回
平面投影点集平面范围
typedef NS_ENUM ( NSUInteger  ,
LMKMapProjectionType   
)

地图投影类型,支持墨卡托投影和4326投影

墨卡托投影,默认(支持矢量地图和栅格地图)

4326投影(暂时只支持栅格地图)

变量说明

const LMKMapRect LMKMapRectWorld
const LMKMapRect LMKMapRectZero
const LMKMapSize LMKMapSizeWorld

const常量定义