GET STARTED

Adding the GLMap.framework to your Xcode or Android Studio project is easy and should take just about a minute.
Please, take the following steps to complete it.

iOS

Integrate framework using CocoaPods

GLMap published into CocoaPods as 3 different pods:

It's easy to add GLMap into your project:

Step 1: Run pod repo update to make CocoaPods aware of the latest available GLMap versions.

Step 2: In your Podfile, add pod 'GLMap' to your app target:

platform :ios, '8.0'
use_frameworks!

target 'TargetName' do
    pod 'GLMap'
end

Step 3: From the command line, run pod install.

Step 4: Use the .xcworkspace file generated by CocoaPods to work on your project.

Integrate static framework manually

Step 1: Add the GLMap framework

Step 2: Add resources

Step 3: Link with libraries

Use framework - Objective-C

Initialize GLMapManager inside your AppDelegate

#import <GLMap/GLMap.h>
@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [GLMapManager sharedManager].apiKey = <#API key#>;
    return YES;
}

Create GLMapView and add as subview

#import <GLMap/GLMap.h>

@implementation ViewController
-(void)viewDidLoad {
    GLMapView *mapView = [[GLMapView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:mapView];
}

Objective-C usage examples is available inside our demo app: pod try GLMap

iOS API documentation is available at: https://getyourmap.com/docs/objc/api/latest/.

iOS demo applications is available at: https://github.com/GLMap/examples-ios.

Use framework - Swift

Initialize GLMapManager inside your AppDelegate

import GLMapSwift

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        GLMapManager.sharedManager().apiKey = <#API key#>
        return true
    }
}

Create GLMapView and add as subview

import GLMapSwift

class ViewController: UIViewController {    
    override func viewDidLoad() {
        super.viewDidLoad()

        let mapView = GLMapView(frame: self.view.bounds)
        self.view.addSubview(mapView)
    }
}

Swift usage examples is available inside our demo app: pod try GLMapSwift

iOS API documentation is available at: https://getyourmap.com/docs/objc/api/latest/.
Swift extension API documentation is available at: https://getyourmap.com/docs/swift/api/latest/

iOS demo applications is available at: https://github.com/GLMap/examples-ios.

Android

Before integration make sure your project build with Android API version 15+.

Step 1: Add the getyourmap repository to the project level build.gradle file.

allprojects {
    repositories {
        // other repositories
        maven { url 'http://maven.getyourmap.com/artifactory/libs' }
    }
}

Step 2: Add dependency into module level build.gradle file.

dependencies {
    // other dependencies
    compile('com.getyourmap:glmap:0.8.5') {
        transitive = true
    }
}

Step 3: Add GLMapView into layout file

<com.glmapview.GLMapView
    android:id="@+id/map_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:keepScreenOn="true"/>

Step 4: Initialize GLMapManager and GLMapView

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    // init GLMapManager with activity and your API key
    GLMapManager.initialize(this, <#API key#>, null);

    // set asset manager, and load style from bundle inside assets
    GLMapView mapView = (GLMapView) this.findViewById(R.id.map_view);
    mapView.setAssetManager(this.getAssets());
    mapView.loadStyle("DefaultStyle.bundle");
}

Android API documentation is available at https://getyourmap.com/docs/java/api/latest/.

Android demo application is available at: https://github.com/GLMap/examples-android.