iOS

Embed a 3D map

Display a 3d map in a view controller.

#import "ViewController.h"
#import "SamplesMessage.h"
@import Wrld;

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    WRLDMapView *mapView = [[WRLDMapView alloc] initWithFrame:self.view.bounds];
    
    mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    
    // set the center of the map and the zoom level
    [mapView setCenterCoordinate:CLLocationCoordinate2DMake(37.7858, -122.401)
                        zoomLevel:15
                         animated:NO];
    
    [self.view addSubview:mapView];
    
    [SamplesMessage showWithMessage:@"Welcome to WRLD maps"];
}

@end
v0.0.845