CARVIEW |
Select Language
HTTP/2 301
location: https://raw.githubusercontent.com/neilang/NAMapKit/v3.2.0/Demo/Demo/NATiledImageDemoViewController.m
accept-ranges: bytes
age: 0
date: Sat, 11 Oct 2025 11:31:55 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210051-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760182314.885931,VS0,VE1208
vary: Accept-Encoding
x-fastly-request-id: 7b34f2813c29e9360026ce3fcf5b53e5900add48
content-length: 0
HTTP/2 200
cache-control: max-age=300
content-security-policy: default-src 'none'; style-src 'unsafe-inline'; sandbox
content-type: text/plain; charset=utf-8
etag: W/"5239639ea6d54d5a5bd0a2093f3770206937baef073a15cf8c21baff3b03048f"
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
x-github-request-id: 131F:3761FC:EB226:25ABC9:68EA4028
content-encoding: gzip
accept-ranges: bytes
date: Sat, 11 Oct 2025 11:31:55 GMT
via: 1.1 varnish
x-served-by: cache-bom-vanm7210057-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1760182315.155635,VS0,VE336
vary: Authorization,Accept-Encoding
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
x-fastly-request-id: 4b2abefa7bfcc33af34b9d838d3c39688ea26796
expires: Sat, 11 Oct 2025 11:36:55 GMT
source-age: 0
content-length: 966
//
// NATiledImageDemoViewController.m
// Demo
//
// Created by Daniel Doubrovkine on 3/10/14.
// Copyright (c) 2010-14 neilang.com. All rights reserved.
//
#import "NATiledImageDemoViewController.h"
#import "NATiledImageMapView.h"
#import
#import "NADotAnnotation.h"
@interface NATiledImageDemoViewController ()
@property(nonatomic, readonly) NATiledImageMapView *mapView;
@property(nonatomic, readonly) ARLocalTiledImageDataSource *dataSource;
@end
@implementation NATiledImageDemoViewController
- (void)viewDidLoad
{
[super viewDidLoad];
ARLocalTiledImageDataSource *dataSource = [[ARLocalTiledImageDataSource alloc] init];
dataSource.maxTiledHeight = 5389;
dataSource.maxTiledWidth = 5000;
dataSource.minTileLevel = 11;
dataSource.maxTileLevel = 13;
dataSource.tileSize = 512;
dataSource.tileFormat = @"jpg";
dataSource.tileBasePath = [NSString stringWithFormat:@"%@/Maps/Armory2014/tiles", [NSBundle mainBundle].resourcePath];
_dataSource = dataSource;
NATiledImageMapView *mapView = [[NATiledImageMapView alloc] initWithFrame:self.view.bounds tiledImageDataSource:dataSource];
mapView.backgroundColor = [UIColor colorWithRed:0.000f green:0.475f blue:0.761f alpha:1.000f];
mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
mapView.displayTileBorders = YES;
// NSString *background = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Maps/Armory2014/large.jpg"];
// mapView.backgroundImage = [UIImage imageWithContentsOfFile:background];
mapView.zoomStep = 3.0f;
_mapView = mapView;
[self.view addSubview:mapView];
NADotAnnotation *champagneBar = [NADotAnnotation annotationWithPoint:CGPointMake(1500.0f, 4850.1f)];
champagneBar.radius = 50.0f;
champagneBar.color = [UIColor redColor];
[mapView addAnnotation:champagneBar animated:NO];
NADotAnnotation *artsyBooth = [NADotAnnotation annotationWithPoint:CGPointMake(2650.0f, 916.12f)];
artsyBooth.radius = 40.0f;
artsyBooth.color = [UIColor greenColor];
[mapView addAnnotation:artsyBooth animated:NO];
}
- (void)viewDidAppear:(BOOL)animated
{
[self.mapView zoomToFit:animated];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end