public static void GetCurrentCity(double[] data,Action<string> callback) { GetCurrentCityCallback = callback; MReGeoCode.PoiToAddress(data[1], data[0], (result) => { GetCurrentCityCallback(result.resultList[0].City.Name); }); }
private void ReGeoCodeToAddressWithOption() { MReverseGeocodingOption opt = new MReverseGeocodingOption(); opt.Config = "SPAS"; opt.CrossNumber = 1; opt.Encode = "GBK"; opt.MultiPoint = 1; opt.Pattern = 1; opt.PoiNumber = 20; opt.Range = 10000; opt.RoadNumber = 1; //opt.X = 116.415611575797; //opt.Y = 39.9266989496153; opt.XCoors = new double[] { x }; opt.YCoors = new double[] { y }; opt.RoadLevel = 1; MReGeoCode.GeoCodeToAddressWithOption(opt, CallBack); }