{"id":18271631,"url":"https://github.com/neilang/NAMapKit","last_synced_at":"2025-04-05T02:30:40.689Z","repository":{"id":987431,"uuid":"792415","full_name":"neilang/NAMapKit","owner":"neilang","description":"Allows you to use custom maps in iphone applications and attempts to mimics some of the behaviour of the MapKit framework","archived":false,"fork":false,"pushed_at":"2016-05-05T11:03:51.000Z","size":18524,"stargazers_count":263,"open_issues_count":10,"forks_count":52,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-20T05:41:17.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neilang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-23T01:50:06.000Z","updated_at":"2024-09-20T20:13:54.000Z","dependencies_parsed_at":"2022-08-16T11:45:13.976Z","dependency_job_id":null,"html_url":"https://github.com/neilang/NAMapKit","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilang%2FNAMapKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilang%2FNAMapKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilang%2FNAMapKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neilang%2FNAMapKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neilang","download_url":"https://codeload.github.com/neilang/NAMapKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279224,"owners_count":20912848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T11:39:25.487Z","updated_at":"2025-04-05T02:30:36.105Z","avatar_url":"https://github.com/neilang.png","language":"Objective-C","readme":"NAMapKit\n========\n\n[![Build Status](https://travis-ci.org/neilang/NAMapKit.svg)](https://travis-ci.org/neilang/NAMapKit)\n\nLets you drop pins or custom annotations onto a standard `UIImage` or a tiled `NATiledImageView`. Includes callouts, multi-colored pins, animation, zoom and gestures support.\n\n![Animated Demo](Demo/Screenshots/namapkit.gif)\n\nGet started by running `pod try NAMapKit` in your terminal.\n\nUsage\n-----\n\n#### Default Annotations\n\nCreate a `NAMapView` in a view controller.\n\n``` objc\nNAMapView *mapView = [[NAMapView alloc] initWithFrame:self.view.bounds];\n\nmapView.backgroundColor  = [UIColor colorWithRed:0.000f green:0.475f blue:0.761f alpha:1.000f];\nmapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;\n\nmapView.minimumZoomScale = 0.5f;\nmapView.maximumZoomScale = 1.5f;\n\n[mapView displayMap:[UIImage imageNamed:@\"australia\"]];\n\n[self.view addSubview:mapView];\n```\n\nAdd `NADotAnnotation` annotations.\n\n```\nNADotAnnotation *dot = [NADotAnnotation annotationWithPoint:CGPointMake(543.0f, 489.0f)];\n[mapView addAnnotation:dot animated:NO];\n```\n\n#### Custom Annotations\n\nThe implementation of `NADotAnnotation` places a red semi-transparent dot on the map. For custom annotations, subclass [NAAnnotation](NAMapKit/NAAnnotation.h) and implement `createViewOnMapView` that returns a custom annotation view. You could also implement a custom animation to drop an annotation onto the map by implementing `addToMapView`, or center the annotation depending on your custom logic by overriding `updatePosition`.\n\nYou can find a complete custom annotation example of multi-colored pins in [NAPinAnnotation.h](NAMapKit/NAPinAnnotation.h)/[.m](NAMapKit/NAPinAnnotation.m) and a popup menu demo in [NAPinAnnotationsPopupMenuDemoViewController.h](Demo/Demo/NAPinAnnotationsPopupMenuDemoViewController.h)/[.m](Demo/Demo/NAPinAnnotationsPopupMenuDemoViewController.m).\n\n![circular pop-up animated demo](Demo/Screenshots/namapkit2.gif)\n\n#### Delegates\n\nYou can capture finger taps and zoom changes by registering a `mapViewDelegate` with the map. The delegate must implement the [NAMapViewDelegate](NAMapKit/NAMapViewDelegate.h) protocol.\n\n```objc\n@implementation DemoViewController\n\n- (void)viewDidLoad\n{\n    // Register the view controller as the map's delegate\n    self.mapView.mapViewDelegate = self;\n}\n\n- (void)mapView:(NAMapView *)mapView tappedOnAnnotation:(NAPinAnnotation *)annotation\n{\n    // Invoked when a user taps an annotation\n}\n\n- (void)mapView:(NAMapView *)mapView hasChangedZoomLevel:(CGFloat)level\n{\n    // Invoked when the map zoom level changes\n}\n\n@end\n```\n\nSee [NAAnnotationDemoViewController.m](Demo/Demo/NAAnnotationDemoViewController.m) for a complete example.\n\n#### Tiled Maps\n\nNAMapKit comes with [NATiledImageMapView](NAMapKit/NATiledImageMapView.h), which supports tiled maps. A typical organization for deep zoom map tiles consists of a folder for each zoom level and individual JPG files for each tile. You can see an example of such files [here](Demo/Maps/Armory2014/tiles). NAMapKit uses [ARTiledImageView](https://github.com/dblock/ARTiledImageView). You can generate tiles using [dzt](https://github.com/dblock/dzt) or any other tool listed with the [OpenSeadragon](http://openseadragon.github.io/examples/creating-zooming-images) project.\n\nFor a complete example of a tiled map, see [NATiledImageDemoViewController.m](Demo/Demo/NATiledImageDemoViewController.m).\n\n### Custom Gestures\n\nNAMapKit exposes it's two double tap gestures so that you can use `delaysTouchesBegan` to prioritise the double tap over a map point tap. Or to just replace them entirely yourself.\n\nNotes\n-----\n\nIf you are using Interface Builder, you can add a UIScrollView to your XIB and change the class to `NAMapView` to use the framework.\n\nLicense\n-------\n\nThis project is licensed under the [MIT license](LICENSE).\n\nAttribution\n-----------\n\nWhen using this code please include the following attribution:\n\n**Includes NAMapKit code developed by [Neil Ang](http://neilang.com/), [Tony Arnold](http://thecocoabots.com/), [Daniel Doubrovkine](http://code.dblock.org/) and [Orta Therox](http://orta.github.io/).**\n","funding_links":[],"categories":["etc","Maps"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilang%2FNAMapKit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneilang%2FNAMapKit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneilang%2FNAMapKit/lists"}