Skip to content

Cocoa class for draw world map like in Google Analytics

License

Notifications You must be signed in to change notification settings

dev2dev/PTMapView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published