Samples.m 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * Copyright 2016 Google Inc. All rights reserved.
  3. *
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
  6. * file except in compliance with the License. You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software distributed under
  11. * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  12. * ANY KIND, either express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. #import "GoogleMapsDemos/Samples/Samples.h"
  16. #import "GoogleMapsDemos/Samples/AnimatedCurrentLocationViewController.h"
  17. #import "GoogleMapsDemos/Samples/AnimatedUIViewMarkerViewController.h"
  18. #import "GoogleMapsDemos/Samples/BasicMapViewController.h"
  19. #import "GoogleMapsDemos/Samples/CameraViewController.h"
  20. #import "GoogleMapsDemos/Samples/CustomIndoorViewController.h"
  21. #import "GoogleMapsDemos/Samples/CustomMarkersViewController.h"
  22. #import "GoogleMapsDemos/Samples/DoubleMapViewController.h"
  23. #import "GoogleMapsDemos/Samples/FitBoundsViewController.h"
  24. #import "GoogleMapsDemos/Samples/FixedPanoramaViewController.h"
  25. #import "GoogleMapsDemos/Samples/FrameRateViewController.h"
  26. #import "GoogleMapsDemos/Samples/GeocoderViewController.h"
  27. #import "GoogleMapsDemos/Samples/GestureControlViewController.h"
  28. #import "GoogleMapsDemos/Samples/GradientPolylinesViewController.h"
  29. #import "GoogleMapsDemos/Samples/GroundOverlayViewController.h"
  30. #import "GoogleMapsDemos/Samples/IndoorMuseumNavigationViewController.h"
  31. #import "GoogleMapsDemos/Samples/IndoorViewController.h"
  32. #import "GoogleMapsDemos/Samples/MapLayerViewController.h"
  33. #import "GoogleMapsDemos/Samples/MapTypesViewController.h"
  34. #import "GoogleMapsDemos/Samples/MapZoomViewController.h"
  35. #import "GoogleMapsDemos/Samples/MarkerEventsViewController.h"
  36. #import "GoogleMapsDemos/Samples/MarkerInfoWindowViewController.h"
  37. #import "GoogleMapsDemos/Samples/MarkerLayerViewController.h"
  38. #import "GoogleMapsDemos/Samples/MarkersViewController.h"
  39. #import "GoogleMapsDemos/Samples/MyLocationViewController.h"
  40. #import "GoogleMapsDemos/Samples/PaddingBehaviorViewController.h"
  41. #import "GoogleMapsDemos/Samples/PanoramaViewController.h"
  42. #import "GoogleMapsDemos/Samples/PolygonsViewController.h"
  43. #import "GoogleMapsDemos/Samples/PolylinesViewController.h"
  44. #import "GoogleMapsDemos/Samples/SnapshotReadyViewController.h"
  45. #import "GoogleMapsDemos/Samples/StructuredGeocoderViewController.h"
  46. #import "GoogleMapsDemos/Samples/StyledMapViewController.h"
  47. #import "GoogleMapsDemos/Samples/TileLayerViewController.h"
  48. #import "GoogleMapsDemos/Samples/TrafficMapViewController.h"
  49. #import "GoogleMapsDemos/Samples/VisibleRegionViewController.h"
  50. @implementation Samples
  51. + (NSArray *)loadSections {
  52. return @[ @"Map", @"Panorama", @"Overlays", @"Camera", @"Services" ];
  53. }
  54. + (NSArray *)loadDemos {
  55. NSArray *mapDemos =
  56. @[[self newDemo:[BasicMapViewController class]
  57. withTitle:@"Basic Map"
  58. andDescription:nil],
  59. [self newDemo:[MapTypesViewController class]
  60. withTitle:@"Map Types"
  61. andDescription:nil],
  62. [self newDemo:[StyledMapViewController class]
  63. withTitle:@"Styled Map"
  64. andDescription:nil],
  65. [self newDemo:[TrafficMapViewController class]
  66. withTitle:@"Traffic Layer"
  67. andDescription:nil],
  68. [self newDemo:[MyLocationViewController class]
  69. withTitle:@"My Location"
  70. andDescription:nil],
  71. [self newDemo:[IndoorViewController class]
  72. withTitle:@"Indoor"
  73. andDescription:nil],
  74. [self newDemo:[CustomIndoorViewController class]
  75. withTitle:@"Indoor with Custom Level Select"
  76. andDescription:nil],
  77. [self newDemo:[IndoorMuseumNavigationViewController class]
  78. withTitle:@"Indoor Museum Navigator"
  79. andDescription:nil],
  80. [self newDemo:[GestureControlViewController class]
  81. withTitle:@"Gesture Control"
  82. andDescription:nil],
  83. [self newDemo:[SnapshotReadyViewController class]
  84. withTitle:@"Snapshot Ready"
  85. andDescription:nil],
  86. [self newDemo:[DoubleMapViewController class]
  87. withTitle:@"Two Maps"
  88. andDescription:nil],
  89. [self newDemo:[VisibleRegionViewController class]
  90. withTitle:@"Visible Regions"
  91. andDescription:nil],
  92. [self newDemo:[MapZoomViewController class]
  93. withTitle:@"Min/Max Zoom"
  94. andDescription:nil],
  95. [self newDemo:[FrameRateViewController class]
  96. withTitle:@"Frame Rate"
  97. andDescription:nil],
  98. [self newDemo:[PaddingBehaviorViewController class]
  99. withTitle:@"Padding Behavior"
  100. andDescription:nil],
  101. ];
  102. NSArray *panoramaDemos =
  103. @[[self newDemo:[PanoramaViewController class]
  104. withTitle:@"Street View"
  105. andDescription:nil],
  106. [self newDemo:[FixedPanoramaViewController class]
  107. withTitle:@"Fixed Street View"
  108. andDescription:nil]];
  109. NSArray *overlayDemos =
  110. @[[self newDemo:[MarkersViewController class]
  111. withTitle:@"Markers"
  112. andDescription:nil],
  113. [self newDemo:[CustomMarkersViewController class]
  114. withTitle:@"Custom Markers"
  115. andDescription:nil],
  116. [self newDemo:[AnimatedUIViewMarkerViewController class]
  117. withTitle:@"UIView Markers"
  118. andDescription:nil],
  119. [self newDemo:[MarkerEventsViewController class]
  120. withTitle:@"Marker Events"
  121. andDescription:nil],
  122. [self newDemo:[MarkerLayerViewController class]
  123. withTitle:@"Marker Layer"
  124. andDescription:nil],
  125. [self newDemo:[MarkerInfoWindowViewController class]
  126. withTitle:@"Custom Info Windows"
  127. andDescription:nil],
  128. [self newDemo:[PolygonsViewController class]
  129. withTitle:@"Polygons"
  130. andDescription:nil],
  131. [self newDemo:[PolylinesViewController class]
  132. withTitle:@"Polylines"
  133. andDescription:nil],
  134. [self newDemo:[GroundOverlayViewController class]
  135. withTitle:@"Ground Overlays"
  136. andDescription:nil],
  137. [self newDemo:[TileLayerViewController class]
  138. withTitle:@"Tile Layers"
  139. andDescription:nil],
  140. [self newDemo:[AnimatedCurrentLocationViewController class]
  141. withTitle:@"Animated Current Location"
  142. andDescription:nil],
  143. [self newDemo:[GradientPolylinesViewController class]
  144. withTitle:@"Gradient Polylines"
  145. andDescription:nil]];
  146. NSArray *cameraDemos =
  147. @[[self newDemo:[FitBoundsViewController class]
  148. withTitle:@"Fit Bounds"
  149. andDescription:nil],
  150. [self newDemo:[CameraViewController class]
  151. withTitle:@"Camera Animation"
  152. andDescription:nil],
  153. [self newDemo:[MapLayerViewController class]
  154. withTitle:@"Map Layer"
  155. andDescription:nil]];
  156. NSArray *servicesDemos =
  157. @[[self newDemo:[GeocoderViewController class]
  158. withTitle:@"Geocoder"
  159. andDescription:nil],
  160. [self newDemo:[StructuredGeocoderViewController class]
  161. withTitle:@"Structured Geocoder"
  162. andDescription:nil],
  163. ];
  164. return @[mapDemos, panoramaDemos, overlayDemos, cameraDemos, servicesDemos];
  165. }
  166. + (NSDictionary *)newDemo:(Class) class
  167. withTitle:(NSString *)title
  168. andDescription:(NSString *)description {
  169. return [[NSDictionary alloc] initWithObjectsAndKeys:class, @"controller",
  170. title, @"title", description, @"description", nil];
  171. }
  172. @end