Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1.01 KB

README.md

File metadata and controls

39 lines (25 loc) · 1.01 KB

#Mardinate

China Map Coordinate Fix / WGS84 Coorindate to Mars Coordinate Conversion without database lookup.

##Usage

###C Interface

#include "Mardinate.h"

void MardinateConvertWGS84Coordinate(double wLatitude, double wLongitude, double* mLatitude, double* mLongitude);

###Objective-C Interface

#import "OMardinate.h"

+ (CLLocationCoordinate2D)convertWGS84Coordinate:(CLLocationCoordinate2D)coordinate;
+ (CLLocation*)convertWGS84Location:(CLLocation*)location;

###CLLocation Category

#import "CLLocation+Mardinate.h"

- (CLLocation*)mardinateFix;

##Comparsion with MapKit's result

MapKit has built-in China map coorindate fix when retriving user location from MKMapView. Preliminary tests show the distance between MapKit's result and Mardinate's result is about 0.5 meters to 5 meters.

##Credits This piece of code is just a port of the C# implementation found here. All credits goes to the original, anonymous, author.