How Easy To Integrate HereMap SDK In iOS App, Read This!
Recently, we were working on a social app of one of our clients. Their requirement was to add map feature in the app and especially HereMap. To integrate HereMap iOS SDK in the app was a great experience for our team. In this guide, we will give you a detailed information about integrating the HereMap iOS SDK in your iOS app.
What is the HERE iOS SDK?
The HereMap iOS SDK provides a set of programming interfaces that enable developers to build immersive, geographically-aware iOS applications by leveraging a powerful and flexible mapping platform. Through this SDK, developers can add rich location features such as routing, interactive maps, and global place search to their applications. The powerful client-side HereMap iOS SDK also includes a sophisticated engine for rendering map data and calculated routes.
Feature ListsThe main features offered by the HereMap iOS SDK are listed below.
Mapping:
- Raster map tiles with high resolution support.
- Map styles: Normal, Satellite, Terrain, and more.
- Touch gestures such as tap, pan, and pinch.
- Overlay objects on the map such as polylines, polygons, icons, routes.
- Search through a broad set of geographical content across the globe (including streets, address points, and categorized places).
- User can Search Places for somewhere specific or explore by categories.
- Access rich details for a Point of Interest from third-party content sources (including images, ratings, reviews, and editorials).
- Perform geocoding and reverse geocoding lookups.
- Online Car and Pedestrian Route Directions.
- Specify preferred route type (fastest or shortest) and route options (such as avoiding toll roads, motorways, and parks).
- Alternate routes.
In addition to the applicable terms and conditions under which you have licensed the SDK, the following shall apply: AppId and AppCode – You may see on Authenticating Applications .
System Requirements- HereMap SDK supports iOS 11 or above. iOS 12 is recommended for optimal operation.
- It is designed and tested for use with iOS phones and tablets. Supported devices are:
- iPhone 5 or newer
- iPad 3 or newer
- iPad Mini 2 or newer
- Apps should be developed using XCode 10 or above, running on macOS 10.13.6 or above.
- Acquire HERE Credentials.
- Launch the sample project using CocoaPods or manually from the package.
Steps To Implements HereMap In iOS Map:
1. Acquire HereMap SDK Credentials
Before working with with HERE SDK, you need to acquire a set of credentials by registering your application on http://developer.here.com. Each application requires a unique set of credentials.
2. Create an NMAMapView
Select Main.storyboard in the navigator. Add the import statement to the top of this file:@import NMAKit; Name the outlet mapView, keep the other default options and then select Connect.
3. Now an outlet to NMAMapView is set. The modified file should be as follows:
#import "HelloMapViewController.h" @import NMAKit; @interface HelloMapViewController () @property (weak, nonatomic) IBOutlet NMAMapView *mapView; @end@implementation HelloMapViewController
(void)viewDidLoad
{
[super viewDidLoad];
}(void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
4. Implement NMAMapView setup and lifecycle code by modifying the viewDidLoad method as shown:-
(void)viewDidLoad { [super viewDidLoad]; //set geo center NMAGeoCoordinates *geoCoordCenter = [[NMAGeoCoordinates alloc] initWithLatitude:49.260327 longitude:-123.115025]; [self.mapView setGeoCenter:geoCoordCenter withAnimation:NMAMapAnimationNone]; self.mapView.copyrightLogoPosition = NMALayoutPositionBottomCenter;//set zoom level
self.mapView.zoomLevel = 13.2;
}5. Add your HERE application credentials.
- Open AppDelegate.m and import NMAKit by adding the following import statement to the top of the file.@import NMAKit;
- Add the following in the didFinishLaunchingWithOptions method, replacing YOUR_APP_ID and YOUR_APP_CODE with the credentials that you received from http://developer.here.com.[NMAApplicationContext setAppId:@"{YOUR_APP_ID}" appCode:@"{YOUR_APP_CODE}"];.
Conclusion
Hope this article would help you understand the HereMap SDK integration in depth. There are various methods provided by the SDK to use its mapping and location changing properties. You can take help from the documentation provided by the platform itself, below are some references for its documentation.
References
Further Reading
How to build a website quickly using Platform over Custom development?
How Easy To Implement DZVideoPlayer in iOS App
Posted from my blog with : https://www.ipragmatech.com/how-easy-to-integrate-heremap-sdk-os-application/
Congratulations @ipragmatech! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!