SlideShare uma empresa Scribd logo
1 de 10
Google Map
Implementation
~Jayanta Sinhamahapatra.
POD SETUP
• 1) Open terminal
• 2) sudo gem install cocoapods (gem will get installed in Ruby inside
System library) or Try on 10.11 Mac OSX El Caption sudo gem install -
n /usr/local/bin cocoapods
• 3) pod setup
• 4) create a xcode project
• 5) cd "path to your project root directory"
• 6) pod init
• 7) open -a Xcode Podfile (podfile will get open in text mode. Initially
it will be empty put the following line of code.)
• 8) pod 'AFNetworking', '0.9.1’
(It’s finally time to add your first dependency using CocoaPods! Copy
and paste the following into your pod file, right after target
"AFNetworkingProject" do:)
Google Account Setup
• Go to the Google Developers Console.
• Create or select a project.
• Click Continue to enable the Google Maps SDK for iOS API.
Optionally, you can also enable the Google Places API for iOS now.
Alternatively, you can enable the Google Places API for iOS later, if
you need it.
• On the Credentials page, get an iOS key and set the API credentials.
Note: If you have an existing iOS key, you may use that key. You can
use the same key with any of your iOS applications within the same
project.
• Enter your app's bundle identifier when prompted. For example:
com.example.hellomap.
• Click Create.
• Your new iOS key appears in the list of API keys for your project. An
API key is a string of characters, something like this:
• AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0
API KEY
LIST OF API
API Key Setup in IOS Project
Add your API key to your AppDelegate.m as follows:
• Add the following import statement:
@import GoogleMaps;
• Add the following to your
application:didFinishLaunchingWithOptions: method,
replacing YOUR_API_KEY with your API key:
• [GMSServices provideAPIKey:@"YOUR_API_KEY"];
Basic Code
• #import "YourViewController.h"
@import GoogleMaps;
@implementation YourViewController {
GMSMapView *mapView_;
}
- (void)viewDidLoad {
// Create a GMSCameraPosition that tells the map to display the
// coordinate -33.86,151.20 at zoom level 6.
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86
longitude:151.20
zoom:6];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
// Creates a marker in the center of the map.
GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(-33.86, 151.20);
marker.title = @"Sydney";
marker.snippet = @"Australia";
marker.map = mapView_;
}
@end
Offline Google Map
• @interface TestTileLayer : GMSSyncTileLayer
• self.testTileLayer = [[TestTileLayer alloc] init];
self.testTileLayer.map = self.mapView_;
List of Links
• https://www.raywenderlich.com/97014
• https://developers.google.com/maps/documentation/ios-
sdk/start#step_6_add_a_map
• https://console.developers.google.com/apis/library?project=p
hrasal-ground-106713
• https://www.raywenderlich.com/109888/google-maps-ios-
sdk-tutorial
Google Map Implementation with offline feature.

Mais conteúdo relacionado

Mais procurados

enjoy sublime plugin
enjoy sublime pluginenjoy sublime plugin
enjoy sublime plugin
Lim Hyung-Joo
 

Mais procurados (19)

Up & running with ECMAScript6
Up & running with ECMAScript6Up & running with ECMAScript6
Up & running with ECMAScript6
 
Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy Framework
 
Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014Introduction to Eclipse Che / EclipseCon 2014
Introduction to Eclipse Che / EclipseCon 2014
 
Android101
Android101Android101
Android101
 
Titanium Alloy Tutorial
Titanium Alloy TutorialTitanium Alloy Tutorial
Titanium Alloy Tutorial
 
From Zero to Docker
From Zero to DockerFrom Zero to Docker
From Zero to Docker
 
Android Studio簡介
Android Studio簡介Android Studio簡介
Android Studio簡介
 
Entwicklung mit Android Studio und Gradle
Entwicklung mit Android Studio und GradleEntwicklung mit Android Studio und Gradle
Entwicklung mit Android Studio und Gradle
 
Say hello world with angular 5
Say hello world with angular 5Say hello world with angular 5
Say hello world with angular 5
 
Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?Democamp Munich 2013: Are you still manually coding UIs?
Democamp Munich 2013: Are you still manually coding UIs?
 
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty GenovaScale your PHP application with Elastic Beanstalk - CloudParty Genova
Scale your PHP application with Elastic Beanstalk - CloudParty Genova
 
React Native: React Meetup 3
React Native: React Meetup 3React Native: React Meetup 3
React Native: React Meetup 3
 
enjoy sublime plugin
enjoy sublime pluginenjoy sublime plugin
enjoy sublime plugin
 
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying ConfigurationIBM Drupal Users Group Discussion on Managing and Deploying Configuration
IBM Drupal Users Group Discussion on Managing and Deploying Configuration
 
An Overview of Angular 4
An Overview of Angular 4 An Overview of Angular 4
An Overview of Angular 4
 
Lessons Learned from running Docker in production
Lessons Learned from running Docker in productionLessons Learned from running Docker in production
Lessons Learned from running Docker in production
 
Android
AndroidAndroid
Android
 
Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0Beginner's Guide to Angular 2.0
Beginner's Guide to Angular 2.0
 
React JS
React JSReact JS
React JS
 

Destaque (12)

What On (Google) Earth Is That For Ss Clc
What On (Google) Earth Is That For Ss ClcWhat On (Google) Earth Is That For Ss Clc
What On (Google) Earth Is That For Ss Clc
 
Checkliste: Google Maps API und Google Maps API Premier im Vergleich
Checkliste: Google Maps API und Google Maps API Premier im VergleichCheckliste: Google Maps API und Google Maps API Premier im Vergleich
Checkliste: Google Maps API und Google Maps API Premier im Vergleich
 
Google maps
Google mapsGoogle maps
Google maps
 
Google maps
Google mapsGoogle maps
Google maps
 
Tutorial google maps
Tutorial google mapsTutorial google maps
Tutorial google maps
 
Google Maps API
Google Maps APIGoogle Maps API
Google Maps API
 
google map and wikimapia
google map and wikimapiagoogle map and wikimapia
google map and wikimapia
 
Google maps
Google mapsGoogle maps
Google maps
 
Google Maps Course
Google Maps CourseGoogle Maps Course
Google Maps Course
 
Android - Google Maps
Android - Google MapsAndroid - Google Maps
Android - Google Maps
 
Google Maps
Google MapsGoogle Maps
Google Maps
 
Google Maps
Google MapsGoogle Maps
Google Maps
 

Semelhante a Google Map Implementation with offline feature.

Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
維佋 唐
 

Semelhante a Google Map Implementation with offline feature. (20)

Calabash for iPhone apps
Calabash for iPhone appsCalabash for iPhone apps
Calabash for iPhone apps
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Integrate Google Map SDK in iOS App
Integrate Google Map SDK in iOS AppIntegrate Google Map SDK in iOS App
Integrate Google Map SDK in iOS App
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
iOS Application Security
iOS Application SecurityiOS Application Security
iOS Application Security
 
How to generate code coverage reports in xcode with slather
How to generate code coverage reports in xcode with slatherHow to generate code coverage reports in xcode with slather
How to generate code coverage reports in xcode with slather
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
NCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile AppsNCDevCon 2017 - Cross Platform Mobile Apps
NCDevCon 2017 - Cross Platform Mobile Apps
 
iOS App Using cordova
iOS App Using cordovaiOS App Using cordova
iOS App Using cordova
 
Private pod support using cocoa pods in ios
Private pod support using cocoa pods in iosPrivate pod support using cocoa pods in ios
Private pod support using cocoa pods in ios
 
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
GitHub Enterprise and Automation with Codedeploy - AWS Summit SG 2017
 
Cocoapods
CocoapodsCocoapods
Cocoapods
 
Desktop apps with node webkit
Desktop apps with node webkitDesktop apps with node webkit
Desktop apps with node webkit
 
White Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and PrimeWhite Paper : ASP.NET Core AngularJs 2 and Prime
White Paper : ASP.NET Core AngularJs 2 and Prime
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
 
Create Your First Cocoa pods
Create Your First Cocoa podsCreate Your First Cocoa pods
Create Your First Cocoa pods
 
Building your first android app using Xamarin
Building your first android app using XamarinBuilding your first android app using Xamarin
Building your first android app using Xamarin
 
Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4Basic iOS Training with SWIFT - Part 4
Basic iOS Training with SWIFT - Part 4
 

Último

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Cara Menggugurkan Kandungan 087776558899
 

Último (6)

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
Leading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdfLeading Mobile App Development Companies in India (2).pdf
Leading Mobile App Development Companies in India (2).pdf
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
9999266834 Call Girls In Noida Sector 52 (Delhi) Call Girl Service
 

Google Map Implementation with offline feature.

  • 2. POD SETUP • 1) Open terminal • 2) sudo gem install cocoapods (gem will get installed in Ruby inside System library) or Try on 10.11 Mac OSX El Caption sudo gem install - n /usr/local/bin cocoapods • 3) pod setup • 4) create a xcode project • 5) cd "path to your project root directory" • 6) pod init • 7) open -a Xcode Podfile (podfile will get open in text mode. Initially it will be empty put the following line of code.) • 8) pod 'AFNetworking', '0.9.1’ (It’s finally time to add your first dependency using CocoaPods! Copy and paste the following into your pod file, right after target "AFNetworkingProject" do:)
  • 3. Google Account Setup • Go to the Google Developers Console. • Create or select a project. • Click Continue to enable the Google Maps SDK for iOS API. Optionally, you can also enable the Google Places API for iOS now. Alternatively, you can enable the Google Places API for iOS later, if you need it. • On the Credentials page, get an iOS key and set the API credentials. Note: If you have an existing iOS key, you may use that key. You can use the same key with any of your iOS applications within the same project. • Enter your app's bundle identifier when prompted. For example: com.example.hellomap. • Click Create. • Your new iOS key appears in the list of API keys for your project. An API key is a string of characters, something like this: • AIzaSyBdVl-cTICSwYKrZ95SuvNw7dbMuDt1KG0
  • 6. API Key Setup in IOS Project Add your API key to your AppDelegate.m as follows: • Add the following import statement: @import GoogleMaps; • Add the following to your application:didFinishLaunchingWithOptions: method, replacing YOUR_API_KEY with your API key: • [GMSServices provideAPIKey:@"YOUR_API_KEY"];
  • 7. Basic Code • #import "YourViewController.h" @import GoogleMaps; @implementation YourViewController { GMSMapView *mapView_; } - (void)viewDidLoad { // Create a GMSCameraPosition that tells the map to display the // coordinate -33.86,151.20 at zoom level 6. GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6]; mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera]; mapView_.myLocationEnabled = YES; self.view = mapView_; // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(-33.86, 151.20); marker.title = @"Sydney"; marker.snippet = @"Australia"; marker.map = mapView_; } @end
  • 8. Offline Google Map • @interface TestTileLayer : GMSSyncTileLayer • self.testTileLayer = [[TestTileLayer alloc] init]; self.testTileLayer.map = self.mapView_;
  • 9. List of Links • https://www.raywenderlich.com/97014 • https://developers.google.com/maps/documentation/ios- sdk/start#step_6_add_a_map • https://console.developers.google.com/apis/library?project=p hrasal-ground-106713 • https://www.raywenderlich.com/109888/google-maps-ios- sdk-tutorial