您现在的位置:
概述
四维地图iOS Service SDK是一套基于iOS 8.0版本及以上操作系统的移动端产品开发工具包,开发者可以调用该SDK接口,轻松访问四维地图的服务和数据,快速构建功能丰富、交互性强的地图类应用程序。SDK提供了电车出行、路径规划、批量算路、路况事件等基本功能,满足不同用户各种应用需求。
功能介绍与体验
-
搜索建议
- (void)searchwithType:(NavinfoSearchCategory)type{ self.query = [[NavinfoPOIQuery alloc] initWithKeyword:@"如家" city:@"北京" lonlats:nil category:SERVICE_API_SEARCH_TEXT];]; self.query.exinfo = 2; self.search = [[NavinfoPOISearch alloc] init]; self.search.delegate = self; [self.search search:self.query]; } - (void)POISearch:(NavinfoPOISearch *)poiSearch result:(NavinfoPOISearchResult *)result error:(NSError *)error{ }
-
充电桩搜索
- (void)searchwithType:(NavinfoSearchCategory)type{ self.query = [[NavinfoPOIQuery alloc] initWithKeyword:@"加油站" city:@"北京" lonlats:nil category:SERVICE_API_EV_TEXT];]; self.query.exinfo = 2; self.search = [[NavinfoPOISearch alloc] init]; self.search.delegate = self; [self.search search:self.query]; } - (void)POISearch:(NavinfoPOISearch *)poiSearch result:(NavinfoPOISearchResult *)result error:(NSError *)error{ }
-
车辆行驶范围
- (void)reachAreaTest{ NavinfoLonlat * centerLonlat = [[NavinfoLonlat alloc]initWith:11637830 latitude:3989856 gbType:NavinfoGbTypeG02]; NavinfoEleCarAreaQuery * areaQuery = [[NavinfoEleCarAreaQuery alloc]initWithAreaCenter:centerLonlat soc:30]; NavinfoEleCarReachAreaSearch * areaSearch = [[NavinfoEleCarReachAreaSearch alloc]init]; [areaSearch startSearchWith:areaQuery]; } - (void)onEleCarReachAreaSearch:(NavinfoEleCarReachAreaSearch * _Nonnull)routeSearch response:(NavinfoEleCarReachAreaResult * _Nullable)response error:(NSError * _Nullable)error{ NSLog(@"Error: %@", error); }
-
路况看板
- (void)trafficCityGraphic { self.tgSearch = [[NavinfoTrafficGraphicSearch alloc] init]; self.tgSearch.delegate = self; NavinfoTrafficCityGraphicQuery *query = [NavinfoTrafficCityGraphicQuery new]; query.cityName = @"大连"; [self.tgSearch cityGraphicSearch:query]; } - (void)onTrafficCityGraphicSearch:(NavinfoTrafficGraphicSearch *)graphicSearch result:(NavinfoTrafficCityGraphicResult *)result error:(NSError *)error { if (error) { NSLog(@"----> error"); } }