Components
GLRoute
online
offline
- Multi-Modal and Time-Based
- Auto, Bike, Pedestrian
- Multilingual Narrative
Integration
- iOS
- Android
- Swift
- Objective-C
- Cocoapods
Package.swift
.package(url: "https://github.com/GLMap/GLMapSwift.git", from: "master")
AppDelegate.swift
import UIKit
import GLMapSwift
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
GLMapManager.activate(apiKey: <#API_KEY#>)
return true
}
}
ViewController.swift
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let mapView = GLMapView(frame: self.view.bounds)
self.view.addSubview(mapView)
}
}
AppDelegate.m
#import <GLMap/GLMap.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GLMapManager activateWithApiKey:<#API key#< resourcesBundle:nil andStoragePath:nil];
return YES;
}
ViewController.m
#import <GLMap/GLMap.h>
@implementation ViewController
-(void)viewDidLoad {
GLMapView *mapView = [[GLMapView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:mapView];
}
Podfile
#import <GLMap/GLMap.h>
platform :ios, '13.0'
use_frameworks!
target 'TargetName' do
pod 'GLMap'
pod 'GLRoute' # if you need navigation
pod 'GLSearch' # if you need search
end
Framework is published on our maven server. Set of libraries depends on features you need:
- GLMap displays map and objects on it
- GLSearch used for geocoding
- GLRoute used for route requests and turn-by-turn navigation
Five steps to add map into your application:
- add maven repository
- add dependencies
- set an API key
- add GLMapView into layout file
- load map style
- Java
build.gradle
repositories {
// Any other repositories
maven { url 'https://maven.globus.software/artifactory/libs' }
}
dependencies {
// Any other dependencies
implementation'com.getyourmap:glmap:1.8.0'
implementation'com.getyourmap:glroute:1.8.0' // if you need navigation
implementation'com.getyourmap:glsearch:1.8.0' // if you need search
}
map_layout.xml
<com.getyourmap.glmap.GLMapView android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:keepScreenOn="true"/>
MapActivity.java
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// set asset manager, and load style from bundle inside assets
GLMapView mapView = (GLMapView) this.findViewById(R.id.map_view);
mapView.loadStyle(this.getAssets(), "DefaultStyle.bundle");
}
App.java
public class YourApp extends Application {
@Override
public void onCreate() {
super.onCreate();
GLMapManager.Initialize(this, <API_KEY>, null);
// If you're going to use GLSearch you should also call
// GLSearch.Initialize(this);
// to let it load it's resources.
}
}
Pricing
Pay as you go. Simple pricing without monthly charges for services you are not using.
Monthly cost
$0
Monthly cost
$0
Maps
Price per download
First 5K
Free
5K - 50K
$0.02
50K - 100K
$0.015
100K+
$0.012
Contact us
We are ready to adapt the framework for a non-standard task and implement it into the application. Tell us about your business and your expectations, so we prepared a commercial offer.
Contact