Skip to content

ptwoms/P2MSRoutingView

Repository files navigation

P2MSRoutingView (OnGoing)

This project is inspired by Google Map application for IOS.

This is supposed to work on IOS 5+.

Supported Maps:

  • Apple built-in Map (MapKit)
  • Google Map (Google Map SDK for IOS)
  • ESRI Map (ArcGIS Runtime SDK for IOS) -- coming soon

GoogleMaps.framework and ArcGIS.framework cannot live together and it is required to use either one in the project.

Map APIs

  • Google Map REST API
  • OneMap REST API (Singapore only) -- coming soon

Please be sure that Google Maps SDK for IOS and Google Places API services are enabled in Google Developer Console and API keys are generated properly.

Follows the steps described in Google Map SDK for IOS Getting Started guide to set up the new project

Please carefully read the usage limits for Places API.

Everyone is invited to contribute to improve and add more features to this library

Usage

Add the Google API Keys in "P2MSMapHelper.h" before running this sample.

#define GOOGLEMAP_IOS_KEY @"add_your_key_here" //Key for iOS apps
#define GOOGLEMAP_API_KEY @"add_your_key_here" //Key for API Access authenticaition

Loading mapView with predefined Place Name and Coordinate

P2MSMapViewController *mapViewC = [[P2MSMapViewController alloc]initWithNibName:nil bundle:nil];

[mapViewC setDefaultLocation:@"Shop Name, #xx-xx, Clementi Shopping Mall,\n Singapore" withCoordinate:CLLocationCoordinate2DMake(1.315047,103.764752)];

mapViewC.mapType = MAP_TYPE_GOOGLE;
// - MAP_TYPE_GOOGLE (default)
// - MAP_TYPE_APPLE
// - MAP_TYPE_ESRI (haven't implemented)

mapViewC.mapAPISource = MAP_API_SOURCE_GOOGLE;
//  - MAP_API_SOURCE_GOOGLE (default), 
//  - MAP_API_SOURCE_ONE_MAP (haven't implemented)
mapViewC.allowDroppedPin = YES;

will result in

Google Map

Apple Map

Sidebar


###Place AutoComplete & Geocode Place Auto

(will add custom data source or local source in later)

Query AutoComplete


Query Auto

Driection


Direction Portrait

Direction Landscap

Direction Detail


Direction Portrait

Direction Portrait

Direction Portrait

####Add/customize transit icons P2MSDirectionView.m

(UIImageView *)getImageViewForRoute:(NSArray *)routeComponent

####Customize Tracking Button for Apple Map P2MSUserTrackingButton.h P2MSUserTrackingButton.m

####Know Issue

  • Memory warning in map rotation (from MKMapKit)

###Credits

###Contributions

  • Contributions and suggestions are welcome.

Releases

No releases published

Packages

No packages published