This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iVBORw0KGgoAAAANSUhEUgAAAQgAAAHPCAIAAAAgedOkAAAKn2lDQ1BJQ0MgUHJvZmlsZQAASImVlgdUU2kWx7/30hst9Bp6k95Beg29NxshoYQSQiCoiA0RR2BEEREBZUCGIgqOSh0LYsHCIKCIfYIMKso4WLChsg9Ywu6enbNn7zk375d77vvnvi/vnvMHgDzI4HJTYDEAUjmZvGBPF1pkVDQN9zuAAAbggTnQZTAzuM6Bgb7gb+PDXaQbidsG81p/3/dfQ5wVl8EEAApEOJaVwUxF+AyS7UwuLxMA1Lye+vpM7jzvRViShwyIcN08Jyxy5zzHLnL/Qk9osCvCAgDwZAaDlwAAaQqp07KYCYgOmYywMYfF5iC8EmEHZiKDhXAOwitSU9PmuRFhndh/0Un4N81YoSaDkSDkxWdZCLwbO4Obwtj4fx7H/47UFP7Sb6ghSU7keQUjVxHkzBqT03yEzIn1D1hiNmuhf4ET+V5hS8zMcI1eYhbDzWeJ+clhzkvM4C3fy86khy4xLy1YqB+X4R4i1I+j+wpnSPEXcjzbg77E2YmhEUucxQ73X+KM5BCf5R5XYZ3HDxbOHM/zED5jasbybEzG8gyZiaFey7NFCmdgxbm5C+ucMGE/N9NFqMlNCRT2x6V4CusZWSHCezORF2yJkxjegcs6gcLzAV4gENBANDBFtogNQGbchsz5YV3TuBt57ITETJozsi1xNDqHabiCZmpsYgHA/O4t/rXvbi3sFCQbu1zjIe+qDbIP0NhybU0XAGfGABDNXq5pId/FTwNwcYjJ52Ut1tDzHxhABKJAEsgBZaAOdIABMpslsANOwB14gwAQCqLAWsAEiSAV8MB6kAO2g3xQCPaCA6ACVIOjoBGcAKdABzgLLoKr4CYYBCPgIRCACfAKTIMPYBaCIBxEgaiQHKQCaUL6kClkDTlA7pAvFAxFQTFQAsSB+FAOtAMqhEqgCqgGaoJ+gbqgi9B1aAi6D41Bk9Bb6AuMgsmwJKwEa8FGsDXsDPvA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MapActivity extends FragmentActivity implements LocationListener { | |
//instance variables for Marker icon drawable resources | |
private int userIcon, foodIcon, drinkIcon, shopIcon, otherIcon; | |
//the map | |
private GoogleMap theMap; | |
//location manager | |
private LocationManager locMan; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController { | |
GMSMapView *mapView_; | |
CLLocationManager *locationManager_; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func delay(#seconds: Double, completion:()->()) { | |
let popTime = dispatch_time(DISPATCH_TIME_NOW, Int64( Double(NSEC_PER_SEC) * seconds )) | |
dispatch_after(popTime, dispatch_get_main_queue()) { | |
completion() | |
} | |
} | |
class ViewController: UIViewController, GMSMapViewDelegate { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)test { | |
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"comgooglemaps-x-callback://"]]) { | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:@"comgooglemaps-x-callback://?saddr=%@,%@&daddr=%@,%@&", @"18.9750", @"72.8258", @"23.0300",@"72.5800"]]]; | |
} else { | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%@,%@&daddr=%@,%@", @"18.9750", @"72.8258", @"23.0300",@"72.5800"]]]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController ()<CLLocationManagerDelegate> | |
@end | |
@implementation ViewController { | |
GMSMapView *mapView_; | |
CLLocationManager *locationManager_; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController () <CLLocationManagerDelegate> | |
@end | |
@implementation ViewController{ | |
NSString *currentLongitude; | |
NSString *currentLatitude; | |
NSString *googleMapsURL; | |
CLLocationManager *locationManager_; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "GmapViewController.h" | |
#import "AFNetworking.h" | |
@import GoogleMaps; | |
@interface GmapViewController () | |
@end | |
@implementation GmapViewController | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mport UIKit | |
import GoogleMaps | |
class ViewController: UIViewController { | |
let locationManager = CLLocationManager(); | |
var placesClient: GMSPlacesClient? | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController { | |
@IBOutlet weak var testView: UIView! | |
var locationManager = CLLocationManager(); | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
super.viewDidLoad() |
OlderNewer