Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 758 Bytes

README.mdown

File metadata and controls

36 lines (24 loc) · 758 Bytes

Using PTMapView

Add files PTMapView.h and PTMapView.m into your project

Put NSView on you form

Set NSView class to PTMapView

Set outlet in controller IBOutlet PTMapView *mapView

Import class import "PTMapView.h"

Prepare view mapView.dataSource = self; mapView.delegate = self;

mapView.backgroundColor = [NSColor whiteColor];
mapView.textColor = [NSColor blackColor];
mapView.color = [NSColor orangeColor];

Add method for data source protocol - (NSNumber *)valueForCountry:(NSString *)code { return [NSNumber numberWithInt:random() % 100]; }

code - country code in ISA format (uppercase)

Draw map [mapView draw];

Enjoy!

PTMapView