Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Cocoa class for draw world map like in Google Analytics

Resources

Stars

9 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors