Browse files

cloned iosched from Google Code

  • Loading branch information...
0 parents commit e5bde98312a30149abe3b0e4f4393c875dc16278 @jwang committed May 3, 2011
Showing with 15,667 additions and 0 deletions.
  1. +50 −0 .gitignore
  2. +194 −0 AndroidManifest.xml
  3. +202 −0 COPYING
  4. 0 README.md
  5. BIN art/btn_block.9.psd
  6. BIN art/ic_launcher.psd
  7. BIN art/ic_title.psd
  8. BIN art/ic_track.9.psd
  9. BIN art/screens.png
  10. +32 −0 assets/cache-sessions.xml
  11. +5 −0 assets/cache-speakers.xml
  12. +20 −0 assets/cache-vendors.xml
  13. +21 −0 build.properties
  14. +67 −0 build.xml
  15. +14 −0 default.properties
  16. +160 −0 map/embed.html
  17. BIN map/images/bar.png
  18. BIN map/images/goto_location.png
  19. BIN map/images/headline.gif
  20. BIN map/images/io2010logo.png
  21. BIN map/images/marker-generic.png
  22. BIN map/images/marker-info.png
  23. BIN map/images/marker-media.png
  24. BIN map/images/marker-shadow.png
  25. BIN map/images/mobile-bar.png
  26. BIN map/images/mobileio2010logo.png
  27. BIN map/images/my_location.png
  28. BIN map/images/my_location_diff.png
  29. +67 −0 map/index.html
  30. +1,238 −0 map/scripts/googleio.js
  31. +194 −0 map/styles/display.css
  32. +157 −0 map/styles/mobile.css
  33. +21 −0 res/anim/slide_left_in.xml
  34. +21 −0 res/anim/slide_left_out.xml
  35. +21 −0 res/anim/slide_right_in.xml
  36. +21 −0 res/anim/slide_right_out.xml
  37. BIN res/drawable-hdpi/btn_bg_pressed.9.png
  38. BIN res/drawable-hdpi/btn_bg_selected.9.png
  39. BIN res/drawable-hdpi/btn_block_border_default.9.png
  40. BIN res/drawable-hdpi/btn_block_border_pressed.9.png
  41. BIN res/drawable-hdpi/btn_block_border_selected.9.png
  42. BIN res/drawable-hdpi/btn_block_color_target.9.png
  43. BIN res/drawable-hdpi/btn_block_star.9.png
  44. BIN res/drawable-hdpi/btn_now_playing_default.9.png
  45. BIN res/drawable-hdpi/btn_now_playing_pressed.9.png
  46. BIN res/drawable-hdpi/btn_now_playing_selected.9.png
  47. BIN res/drawable-hdpi/colorstrip.png
  48. BIN res/drawable-hdpi/home_btn_map_default.png
  49. BIN res/drawable-hdpi/home_btn_map_pressed.png
  50. BIN res/drawable-hdpi/home_btn_map_selected.png
  51. BIN res/drawable-hdpi/home_btn_office_hours_default.png
  52. BIN res/drawable-hdpi/home_btn_office_hours_pressed.png
  53. BIN res/drawable-hdpi/home_btn_office_hours_selected.png
  54. BIN res/drawable-hdpi/home_btn_sandbox_default.png
  55. BIN res/drawable-hdpi/home_btn_sandbox_pressed.png
  56. BIN res/drawable-hdpi/home_btn_sandbox_selected.png
  57. BIN res/drawable-hdpi/home_btn_schedule_default.png
  58. BIN res/drawable-hdpi/home_btn_schedule_pressed.png
  59. BIN res/drawable-hdpi/home_btn_schedule_selected.png
  60. BIN res/drawable-hdpi/home_btn_sessions_default.png
  61. BIN res/drawable-hdpi/home_btn_sessions_pressed.png
  62. BIN res/drawable-hdpi/home_btn_sessions_selected.png
  63. BIN res/drawable-hdpi/home_btn_starred_default.png
  64. BIN res/drawable-hdpi/home_btn_starred_pressed.png
  65. BIN res/drawable-hdpi/home_btn_starred_selected.png
  66. BIN res/drawable-hdpi/ic_launcher.png
  67. BIN res/drawable-hdpi/ic_now_playing_logo_alt.png
  68. BIN res/drawable-hdpi/ic_now_playing_logo_default.png
  69. BIN res/drawable-hdpi/ic_now_playing_more_alt.png
  70. BIN res/drawable-hdpi/ic_now_playing_more_default.png
  71. BIN res/drawable-hdpi/ic_title_export_alt.png
  72. BIN res/drawable-hdpi/ic_title_export_default.png
  73. BIN res/drawable-hdpi/ic_title_home_alt.png
  74. BIN res/drawable-hdpi/ic_title_home_default.png
  75. BIN res/drawable-hdpi/ic_title_map_alt.png
  76. BIN res/drawable-hdpi/ic_title_map_default.png
  77. BIN res/drawable-hdpi/ic_title_refresh_alt.png
  78. BIN res/drawable-hdpi/ic_title_refresh_default.png
  79. BIN res/drawable-hdpi/ic_title_search_alt.png
  80. BIN res/drawable-hdpi/ic_title_search_default.png
  81. BIN res/drawable-hdpi/ic_title_share_alt.png
  82. BIN res/drawable-hdpi/ic_title_share_default.png
  83. BIN res/drawable-hdpi/ic_track_border.9.png
  84. BIN res/drawable-hdpi/ic_track_color_target.9.png
  85. BIN res/drawable-hdpi/minitab_default.9.png
  86. BIN res/drawable-hdpi/minitab_pressed.9.png
  87. BIN res/drawable-hdpi/minitab_selected.9.png
  88. BIN res/drawable-hdpi/minitab_unselected.9.png
  89. BIN res/drawable-hdpi/now_bar.9.png
  90. BIN res/drawable-hdpi/now_playing_icon.png
  91. BIN res/drawable-hdpi/title_logo_default.png
  92. BIN res/drawable-hdpi/title_logo_pressed.png
  93. BIN res/drawable-hdpi/title_logo_selected.png
  94. BIN res/drawable-mdpi/minitab_default.9.png
  95. BIN res/drawable-mdpi/minitab_pressed.9.png
  96. BIN res/drawable-mdpi/minitab_selected.9.png
  97. BIN res/drawable-mdpi/minitab_unselected.9.png
  98. +21 −0 res/drawable/btn_block.xml
  99. +22 −0 res/drawable/btn_block_border.xml
  100. +22 −0 res/drawable/btn_now_playing.xml
  101. +22 −0 res/drawable/btn_now_playing_more.xml
  102. +22 −0 res/drawable/home_btn_map.xml
  103. +22 −0 res/drawable/home_btn_office_hours.xml
  104. +22 −0 res/drawable/home_btn_sandbox.xml
  105. +22 −0 res/drawable/home_btn_schedule.xml
  106. +22 −0 res/drawable/home_btn_sessions.xml
  107. +22 −0 res/drawable/home_btn_starred.xml
  108. +22 −0 res/drawable/ic_now_playing_logo.xml
  109. +22 −0 res/drawable/ic_now_playing_more.xml
  110. +20 −0 res/drawable/ic_title_export.xml
  111. +22 −0 res/drawable/ic_title_export_light.xml
  112. +20 −0 res/drawable/ic_title_home.xml
  113. +22 −0 res/drawable/ic_title_home_light.xml
  114. +20 −0 res/drawable/ic_title_map.xml
  115. +22 −0 res/drawable/ic_title_map_light.xml
  116. +20 −0 res/drawable/ic_title_refresh.xml
  117. +22 −0 res/drawable/ic_title_refresh_light.xml
  118. +20 −0 res/drawable/ic_title_search.xml
  119. +22 −0 res/drawable/ic_title_search_light.xml
  120. +20 −0 res/drawable/ic_title_share.xml
  121. +22 −0 res/drawable/ic_title_share_light.xml
  122. +20 −0 res/drawable/ic_track.xml
  123. +40 −0 res/drawable/minitab.xml
  124. +22 −0 res/drawable/title_button.xml
  125. +22 −0 res/drawable/title_logo.xml
  126. +97 −0 res/layout-land/activity_home.xml
  127. +49 −0 res/layout/activity_blocks_content.xml
  128. +127 −0 res/layout/activity_home.xml
  129. +57 −0 res/layout/activity_map.xml
  130. +70 −0 res/layout/activity_note_edit.xml
  131. +47 −0 res/layout/activity_notes.xml
  132. +31 −0 res/layout/activity_notes_content.xml
  133. +65 −0 res/layout/activity_schedule.xml
  134. +64 −0 res/layout/activity_search.xml
  135. +85 −0 res/layout/activity_session_detail.xml
  136. +41 −0 res/layout/activity_sessions.xml
  137. +31 −0 res/layout/activity_sessions_content.xml
  138. +64 −0 res/layout/activity_starred.xml
  139. +67 −0 res/layout/activity_track_details.xml
  140. +44 −0 res/layout/activity_tracks.xml
  141. +91 −0 res/layout/activity_vendor_detail.xml
  142. +41 −0 res/layout/activity_vendors.xml
  143. +32 −0 res/layout/activity_vendors_content.xml
  144. +20 −0 res/layout/colorstrip.xml
  145. +38 −0 res/layout/list_item_note.xml
  146. +29 −0 res/layout/list_item_note_create.xml
  147. +51 −0 res/layout/list_item_session.xml
  148. +41 −0 res/layout/list_item_track.xml
  149. +51 −0 res/layout/list_item_vendor.xml
  150. +32 −0 res/layout/list_section.xml
  151. +41 −0 res/layout/localize_on_demand.xml
  152. +68 −0 res/layout/now_playing_after.xml
  153. +69 −0 res/layout/now_playing_before.xml
  154. +68 −0 res/layout/now_playing_during.xml
  155. +33 −0 res/layout/speaker_detail.xml
  156. +26 −0 res/layout/tab_indicator.xml
  157. +84 −0 res/layout/tab_session_moderator.xml
  158. +77 −0 res/layout/tab_session_summary.xml
  159. +31 −0 res/layout/tab_track_summary.xml
  160. +111 −0 res/layout/titlebar.xml
  161. +35 −0 res/values/attrs.xml
  162. +31 −0 res/values/colors.xml
  163. +19 −0 res/values/config.xml
  164. +24 −0 res/values/dimens.xml
  165. +30 −0 res/values/ids.xml
  166. +133 −0 res/values/strings.xml
  167. +150 −0 res/values/styles.xml
  168. +121 −0 res/xml/blocks.xml
  169. +39 −0 res/xml/rooms.xml
  170. +106 −0 res/xml/search_suggest.xml
  171. +21 −0 res/xml/searchable.xml
  172. +238 −0 res/xml/sessions.xml
  173. +100 −0 res/xml/tracks.xml
  174. +119 −0 src/com/google/android/apps/iosched/io/LocalBlocksHandler.java
  175. +69 −0 src/com/google/android/apps/iosched/io/LocalExecutor.java
  176. +105 −0 src/com/google/android/apps/iosched/io/LocalRoomsHandler.java
  177. +75 −0 src/com/google/android/apps/iosched/io/LocalSearchSuggestHandler.java
  178. +165 −0 src/com/google/android/apps/iosched/io/LocalSessionsHandler.java
  179. +99 −0 src/com/google/android/apps/iosched/io/LocalTracksHandler.java
  180. +86 −0 src/com/google/android/apps/iosched/io/RemoteExecutor.java
  181. +264 −0 src/com/google/android/apps/iosched/io/RemoteSessionsHandler.java
  182. +112 −0 src/com/google/android/apps/iosched/io/RemoteSpeakersHandler.java
  183. +170 −0 src/com/google/android/apps/iosched/io/RemoteVendorsHandler.java
  184. +117 −0 src/com/google/android/apps/iosched/io/RemoteWorksheetsHandler.java
  185. +106 −0 src/com/google/android/apps/iosched/io/XmlHandler.java
  186. +556 −0 src/com/google/android/apps/iosched/provider/ScheduleContract.java
  187. +383 −0 src/com/google/android/apps/iosched/provider/ScheduleDatabase.java
  188. +729 −0 src/com/google/android/apps/iosched/provider/ScheduleProvider.java
  189. +259 −0 src/com/google/android/apps/iosched/service/SyncService.java
  190. +238 −0 src/com/google/android/apps/iosched/ui/BlocksActivity.java
  191. +399 −0 src/com/google/android/apps/iosched/ui/HomeActivity.java
  192. +216 −0 src/com/google/android/apps/iosched/ui/MapActivity.java
  193. +191 −0 src/com/google/android/apps/iosched/ui/NoteEditActivity.java
  194. +172 −0 src/com/google/android/apps/iosched/ui/NotesActivity.java
  195. +170 −0 src/com/google/android/apps/iosched/ui/ScheduleActivity.java
  196. +110 −0 src/com/google/android/apps/iosched/ui/SearchActivity.java
  197. +635 −0 src/com/google/android/apps/iosched/ui/SessionDetailActivity.java
  198. +261 −0 src/com/google/android/apps/iosched/ui/SessionsActivity.java
  199. +91 −0 src/com/google/android/apps/iosched/ui/StarredActivity.java
  200. +185 −0 src/com/google/android/apps/iosched/ui/TrackDetailActivity.java
  201. +180 −0 src/com/google/android/apps/iosched/ui/TracksActivity.java
  202. +238 −0 src/com/google/android/apps/iosched/ui/VendorDetailActivity.java
  203. +202 −0 src/com/google/android/apps/iosched/ui/VendorsActivity.java
  204. +99 −0 src/com/google/android/apps/iosched/ui/widget/BlockView.java
  205. +137 −0 src/com/google/android/apps/iosched/ui/widget/BlocksLayout.java
  206. +165 −0 src/com/google/android/apps/iosched/ui/widget/TimeRulerView.java
  207. +59 −0 src/com/google/android/apps/iosched/util/DetachableResultReceiver.java
  208. +150 −0 src/com/google/android/apps/iosched/util/FractionalTouchDelegate.java
  209. +64 −0 src/com/google/android/apps/iosched/util/Lists.java
  210. +43 −0 src/com/google/android/apps/iosched/util/Maps.java
  211. +38 −0 src/com/google/android/apps/iosched/util/MathUtils.java
  212. +111 −0 src/com/google/android/apps/iosched/util/NotesExporter.java
  213. +134 −0 src/com/google/android/apps/iosched/util/NotifyingAsyncQueryHandler.java
  214. +217 −0 src/com/google/android/apps/iosched/util/ParserUtils.java
  215. +178 −0 src/com/google/android/apps/iosched/util/SelectionBuilder.java
  216. +84 −0 src/com/google/android/apps/iosched/util/Sets.java
  217. +86 −0 src/com/google/android/apps/iosched/util/SpreadsheetEntry.java
  218. +201 −0 src/com/google/android/apps/iosched/util/UIUtils.java
  219. +92 −0 src/com/google/android/apps/iosched/util/WorksheetEntry.java
  220. +30 −0 tests/AndroidManifest.xml
  221. +17 −0 tests/assets/local-blocks.xml
  222. +24 −0 tests/assets/local-rooms.xml
  223. +21 −0 tests/assets/local-sessions.xml
  224. +85 −0 tests/assets/local-tracks.xml
  225. +41 −0 tests/assets/remote-sessions1.xml
  226. +41 −0 tests/assets/remote-sessions2.xml
  227. +4 −0 tests/assets/spreadsheet-empty.xml
  228. +4 −0 tests/assets/spreadsheet-emptyfield.xml
  229. +5 −0 tests/assets/spreadsheet-normal.xml
  230. +4 −0 tests/assets/spreadsheet-single.xml
  231. +18 −0 tests/build.properties
  232. +22 −0 tests/build.xml
  233. +13 −0 tests/default.properties
  234. +349 −0 tests/src/com/google/android/apps/iosched/io/SessionsHandlerTest.java
  235. +180 −0 tests/src/com/google/android/apps/iosched/io/StubHttpClient.java
  236. +105 −0 tests/src/com/google/android/apps/iosched/util/SpreadsheetEntryTest.java
50 .gitignore
@@ -0,0 +1,50 @@
+# built application files
+*.apk
+*.ap_
+
+# files for the dex VM
+*.dex
+
+# Java class files
+*.class
+
+# generated files
+bin/
+gen/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+
+# OSX
+.DS_Store
+Icon?
+
+# Thumbnails
+._*
+
+# Files that might appear on external disk
+.Spotlight-V100
+.Trashes
+
+# SVN
+.svn/
+
+# Eclipse
+*.pydevproject
+.project
+.metadata
+bin/**
+tmp/**
+tmp/**/*
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+
+# CDT-specific
+.cproject
194 AndroidManifest.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright 2010 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<manifest
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.google.android.apps.iosched"
+ android:versionCode="12"
+ android:versionName="0.12">
+
+ <uses-sdk
+ android:minSdkVersion="5"
+ android:targetSdkVersion="5" />
+
+ <permission
+ android:name="com.google.android.apps.iosched.permission.WRITE_SCHEDULE"
+ android:protectionLevel="normal"
+ android:label="@string/permission_write"
+ android:description="@string/permission_write" />
+
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <application
+ android:label="@string/app_name"
+ android:icon="@drawable/ic_launcher">
+
+ <activity
+ android:name=".ui.HomeActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/app_name"
+ android:icon="@drawable/ic_launcher">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.ScheduleActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_schedule" />
+
+ <activity
+ android:name=".ui.BlocksActivity"
+ android:theme="@style/Theme.IOSched">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <!-- TODO: remove default? -->
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.TAB" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.block" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.TracksActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_tracks">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.track" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.TrackDetailActivity"
+ android:theme="@style/Theme.IOSched">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.item/vnd.iosched.track" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.SessionsActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_sessions">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.TAB" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.session" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.SessionDetailActivity"
+ android:theme="@style/Theme.IOSched">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.item/vnd.iosched.session" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.VendorsActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_vendors">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.TAB" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.vendor" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.VendorDetailActivity"
+ android:theme="@style/Theme.IOSched">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.item/vnd.iosched.vendor" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.NotesActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_notes">
+ <intent-filter>
+ <action android:name="android.intent.action.VIEW" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <category android:name="android.intent.category.TAB" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.note" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.NoteEditActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_note_edit"
+ android:windowSoftInputMode="adjustResize">
+ <intent-filter>
+ <action android:name="android.intent.action.INSERT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.dir/vnd.iosched.note" />
+ </intent-filter>
+ <intent-filter>
+ <action android:name="android.intent.action.EDIT" />
+ <category android:name="android.intent.category.DEFAULT" />
+ <data android:mimeType="vnd.android.cursor.item/vnd.iosched.note" />
+ </intent-filter>
+ </activity>
+
+ <activity
+ android:name=".ui.MapActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_map"
+ android:configChanges="orientation|keyboardHidden" />
+
+ <activity
+ android:name=".ui.StarredActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_starred" />
+
+ <activity
+ android:name=".ui.SearchActivity"
+ android:theme="@style/Theme.IOSched"
+ android:label="@string/title_search"
+ android:launchMode="singleTop">
+ <intent-filter>
+ <action android:name="android.intent.action.SEARCH" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" />
+ </activity>
+
+ <meta-data android:name="android.app.default_searchable" android:value=".ui.SearchActivity" />
+
+ <service android:name=".service.SyncService" />
+
+ <provider
+ android:name=".provider.ScheduleProvider"
+ android:authorities="com.google.android.apps.iosched"
+ android:writePermission="com.google.android.apps.iosched.permission.WRITE_SCHEDULE" />
+
+ </application>
+</manifest>
202 COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
0 README.md
No changes.
BIN art/btn_block.9.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN art/ic_launcher.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN art/ic_title.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN art/ic_track.9.psd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN art/screens.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 assets/cache-sessions.xml
32 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
5 assets/cache-speakers.xml
5 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
20 assets/cache-vendors.xml
20 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
21 build.properties
@@ -0,0 +1,21 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# The name of your application package as defined in the manifest.
+# Used by the 'uninstall' rule.
+application-package=com.google.android.apps.iosched
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
67 build.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="iosched">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked in in Version
+ Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The build.properties file can be created by you and is never touched
+ by the 'android' tool. This is the place to change some of the default property values
+ used by the Ant rules.
+ Here are some properties you may want to change/update:
+
+ application.package
+ the name of your application package as defined in the manifest. Used by the
+ 'uninstall' rule.
+ source.dir
+ the name of the source directory. Default is 'src'.
+ out.dir
+ the name of the output directory. Default is 'bin'.
+
+ Properties related to the SDK location or the project target should be updated
+ using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your application and
+ should be checked in in Version Control Systems.
+
+ -->
+ <property file="build.properties" />
+
+ <!-- The default.properties file is created and updated by the 'android' tool, as well
+ as ADT.
+ This file is an integral part of the build system for your application and
+ should be checked in in Version Control Systems. -->
+ <property file="default.properties" />
+
+ <!-- Custom Android task to deal with the project target, and import the proper rules.
+ This requires ant 1.6.0 or above. -->
+ <path id="android.antlibs">
+ <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
+ </path>
+
+ <taskdef name="setup"
+ classname="com.android.ant.SetupTask"
+ classpathref="android.antlibs" />
+
+ <!-- Execute the Android Setup task that will setup some properties specific to the target,
+ and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/platforms/<target_platform>/templates/android_rules.xml
+
+ To customize some build steps for your project:
+ - copy the content of the main node <project> from android_rules.xml
+ - paste it in this build.xml below the <setup /> task.
+ - disable the import by changing the setup task below to <setup import="false" />
+
+ This will ensure that the properties are setup correctly but that your customized
+ build steps are used.
+ -->
+ <setup />
+
+</project>
14 default.properties
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Indicates whether an apk should be generated for each density.
+split.density=false
+
+# Project target.
+target=android-5
160 map/embed.html
@@ -0,0 +1,160 @@
+<!--
+// Copyright 2010 Google
+
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Google I/O - Interactive Conference Map</title>
+ <meta name="viewport" content="initial-scale=1.0;maximum-scale=1.0;user-scalable=no">
+ <style type="text/css">
+ html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ font-family: Helvetica, Arial;
+ }
+
+ .hide {
+ display: none !important;
+ }
+
+ #map-canvas {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ }
+
+ #toolbox {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ z-index: 1000;
+ background-color: rgba(255, 255, 255, 0.85);
+ height: 48px;
+ }
+
+ #level-buttons {
+ position: absolute;
+ right: 0;
+ top: 0;
+ }
+
+ #label-level {
+ color: #355689;
+ font-weight: bold;
+ font-size: 18px;
+ margin-right: 4px;
+ }
+
+ #my-location,
+ .level-button {
+ display: inline-block;
+ text-decoration: none;
+ text-align: center;
+ background: #fff;
+ outline: 0;
+ color: #355689;
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ margin: 3px;
+ font-weight: bold;
+ font-size: 18px;
+ border: 1px solid rgba(0,0,0,0.5);
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ -moz-box-shadow: 1px 1px 0 rgba(0,0,0,0.25);
+ -webkit-box-shadow: 1px 1px 0 rgba(0,0,0,0.25);
+ box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
+ }
+
+ .level-button {
+ margin-left: -1px;
+ }
+
+ .selected {
+ background: #355689;
+ color: #fff;
+ }
+
+ #my-location {
+ background: #fff url(images/goto_location.png) no-repeat scroll 50% 50%;
+ text-indent: -3000em;
+ }
+
+ .infowindow {
+ font-family: arial, helvetica, sans-serif;
+ font-size: 13px;
+ text-align: left;
+ }
+
+ .infowindow h3 {
+ margin: 0 0 4px 0;
+ padding: 0;
+ color: #000;
+ }
+
+ .session, .sandbox {
+ padding: 2px 0;
+ clear: both;
+ }
+
+ .session-time {
+ color: #aaa;
+ float: left;
+ padding-right: 4px;
+ width: 4em;
+ }
+
+ .session-title {
+ margin-left: 4.3em;
+ width: 200px;
+ }
+
+ .sandbox-items {
+ float: left;
+ width: 145px;
+ padding: 0 8px 2px 0;
+ }
+
+ </style>
+ </head>
+ <body>
+ <div id="map-container">
+ <div id="toolbox" class="hide">
+ <a href="#" id="my-location" class="hide"><span class="hide">My location</span></a>
+ <div id="level-buttons">
+ <span id="label-level">Level</span>
+ <a class="level-button sprite-toggle" id="btn-level1"
+ href="#"><span class="hide">Level</span> <span>1</span></a>
+
+ <a class="level-button sprite-toggle" id="btn-level2"
+ href="#"><span class="hide">Level</span> <span>2</span></a>
+ <a class="level-button sprite-toggle" id="btn-level3"
+ href="#"><span class="hide">Level</span> <span>3</span></a>
+ </div>
+ </div>
+ <div id="map-canvas"></div>
+ </div>
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+ <script type="text/javascript" src="scripts/googleio.js"></script>
+ </body>
+</html>
BIN map/images/bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/goto_location.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/headline.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/io2010logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/marker-generic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/marker-info.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/marker-media.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/marker-shadow.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/mobile-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/mobileio2010logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/my_location.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN map/images/my_location_diff.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 map/index.html
@@ -0,0 +1,67 @@
+<!--
+// Copyright 2010 Google
+
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Google I/O - Interactive Conference Map</title>
+ <link media="only screen and (max-device-width: 480px)" href="styles/mobile.css" type="text/css" rel="stylesheet">
+ <link media="screen and (min-device-width: 481px)" href="styles/display.css" type="text/css" rel="stylesheet">
+ <meta name="viewport" content="initial-scale=1.0;maximum-scale=1.0;user-scalable=no">
+ </head>
+ <body>
+ <div id="container">
+ <div id="top" class="section split">
+ <div class="left">
+ <a id="io-logo" href="/events/io"><span>Google I/O</span></a>
+ </div>
+ <div class="right">
+ <h1>Interactive Conference Map</h1>
+ </div>
+ </div>
+
+ <div id="middle" class="section">
+ <div id="map-container">
+ <div id="toolbox" class="hide">
+ <span id="label-level" class="item">Level</span>
+ <a class="item level-button sprite-toggle" id="btn-level1"
+ href="#"><span class="hide">Level</span> <span>1</span></a>
+ <a class="item level-button sprite-toggle" id="btn-level2"
+ href="#"><span class="hide">Level</span> <span>2</span></a>
+ <a class="item level-button sprite-toggle" id="btn-level3"
+ href="#"><span class="hide">Level</span> <span>3</span></a>
+ </div>
+ <div id="map-canvas"></div>
+ </div>
+ </div>
+
+ <div id="bottom" class="section split">
+ <div id="learn-more" class="left">
+ <a href="/apis/maps">Developers: Learn more about the Google Maps API</a>
+ </div>
+ <div id="copyright" class="right">
+ &copy; 2010 Google
+ </div>
+ </div>
+
+ </div>
+
+ <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
+ <script type="text/javascript" src="scripts/googleio.js"></script>
+ </body>
+</html>
1,238 map/scripts/googleio.js
@@ -0,0 +1,1238 @@
+// Copyright 2010 Google
+
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+/**
+ * The Google IO Mall Map
+ * @constructor
+ */
+function GoogleIo() {
+ this.center_ = new google.maps.LatLng(37.78313383211993,
+ -122.40394949913025);
+
+ this.mapDiv_ = document.getElementById(this.MAP_ID);
+
+ this.map_ = new google.maps.Map(this.mapDiv_, {
+ zoom: 18,
+ center: this.center_,
+ navigationControl: true,
+ mapTypeControl: false,
+ scaleControl: true,
+ mapTypeId: google.maps.MapTypeId.HYBRID
+ });
+
+ this.infoWindow_ = new google.maps.InfoWindow({
+ maxWidth: 330
+ });
+
+ this.isMobile_();
+
+ var that = this;
+ google.maps.event.addListenerOnce(this.map_, 'tilesloaded', function() {
+ that.enableToolbox_();
+ if (that.hasMapContainer_()) {
+ MAP_CONTAINER.onMapReady();
+ }
+ });
+
+ this.addLevelMarkers_();
+
+ if (!document.location.hash) {
+ this.showLevel(this.LEVELS_[0], true);
+ }
+
+ this.checkLocalStorage_();
+
+ this.loadMallMapContent_();
+
+ if (!this.hasMapContainer_()) {
+ this.initLocationHashWatcher_();
+ }
+}
+
+
+/**
+ * @type {string}
+ */
+GoogleIo.prototype.MAP_ID = 'map-canvas';
+
+
+/**
+ * @type {Array.<string>}
+ * @private
+ */
+GoogleIo.prototype.LEVELS_ = ['1', '2', '3'];
+
+
+/**
+ * @type {number?}
+ * @private
+ */
+GoogleIo.prototype.currentLevel_ = null;
+
+
+/**
+ * @type {google.maps.LatLng?}
+ * @private
+ */
+GoogleIo.prototype.userPosition_ = null;
+
+/**
+ * @type {number?}
+ * @private
+ */
+GoogleIo.prototype.userLevel_ = null;
+
+
+/**
+ * @type {string?}
+ * @private
+ */
+GoogleIo.prototype.currentHash_ = null;
+
+
+/**
+ * @type {string}
+ * @private
+ */
+GoogleIo.prototype.SESSION_BASE_ =
+ 'http://code.google.com/events/io/2010/sessions/';
+
+
+/**
+ * @type {Object}
+ * @private
+ */
+GoogleIo.prototype.markers_ = {
+ 'LEVEL1': [],
+ 'LEVEL2': [],
+ 'LEVEL3': []
+};
+
+/**
+ * @type {number}
+ * @private
+ */
+GoogleIo.prototype.markerIndex_ = 10;
+
+/**
+ * @type {number}
+ * @private
+ */
+GoogleIo.prototype.userIndex_ = 11;
+
+/**
+ * @type {string}
+ * @private
+ */
+GoogleIo.prototype.BASE_TILE_URL_ =
+ 'http://www.gstatic.com/io2010maps/tiles/2/';
+
+
+/**
+ * @type {string}
+ * @private
+ */
+GoogleIo.prototype.TILE_TEMPLATE_URL_ = GoogleIo.prototype.BASE_TILE_URL_ +
+ 'L{L}_{Z}_{X}_{Y}.png';
+
+
+/**
+ * @type {string}
+ * @private
+ */
+GoogleIo.prototype.SIMPLE_TILE_TEMPLATE_URL_ =
+ GoogleIo.prototype.BASE_TILE_URL_ + '{Z}_{X}_{Y}.png';
+
+
+/**
+ * @type {number}
+ * @private
+ */
+GoogleIo.prototype.MIN_RESOLUTION_ = 16;
+
+
+/**
+ * @type {number}
+ * @private
+ */
+GoogleIo.prototype.MAX_RESOLUTION_ = 20;
+
+
+/**
+ * @type {boolean}
+ * @private
+ */
+GoogleIo.prototype.ready_ = false;
+
+
+/**
+ * @type {Object}
+ * @private
+ */
+GoogleIo.prototype.RESOLUTION_BOUNDS_ = {
+ 16: [[10484, 10485], [25328, 25329]],
+ 17: [[20969, 20970], [50657, 50658]],
+ 18: [[41939, 41940], [101315, 101317]],
+ 19: [[83878, 83881], [202631, 202634]],
+ 20: [[167757, 167763], [405263, 405269]]
+};
+
+
+/**
+ * Initialise the location hash watcher.
+ *
+ * @private
+ */
+GoogleIo.prototype.initLocationHashWatcher_ = function() {
+ var that = this;
+
+ window.setInterval(function() {
+ that.checkLocationHash_();
+ }, 100);
+};
+
+
+/**
+ * Checks if a MAP_CONTAINER object exists
+ *
+ * @return {boolean} Whether the object exists or not.
+ * @private
+ */
+GoogleIo.prototype.hasMapContainer_ = function() {
+ return typeof(window['MAP_CONTAINER']) !== 'undefined';
+};
+
+
+/**
+ * Checks the local storage
+ * @private
+ */
+GoogleIo.prototype.checkLocalStorage_ = function() {
+ var sandboxItems = this.getFromLocalStorage_('sandbox');
+ if (sandboxItems) {
+ this.sandboxItems_ = sandboxItems;
+ }
+
+ var sessionItems = this.getFromLocalStorage_('sessions');
+ if (sessionItems) {
+ this.sessionItems_ = sessionItems;
+ }
+};
+
+
+/**
+ * Get a item from the local storage
+ * @param {string} key the key of the item to get.
+ * @return {Object|string|null} The item from the local storage.
+ * @private
+ */
+GoogleIo.prototype.getFromLocalStorage_ = function(key) {
+ if (typeof(window['localStorage']) !== 'undefined' &&
+ typeof(window['JSON']) !== 'undefined' && localStorage && JSON) {
+ var value = localStorage.getItem(key);
+
+ // Crude hack to see if its a json object string.
+ // Suits our purpose
+ if (value && value.indexOf('{') !== -1) {
+ return JSON.parse(value);
+ }
+ return value;
+ }
+};
+
+
+/**
+ * Adds data to the local storage
+ * @param {string} key The key of the item to store.
+ * @param {string|Object} value The item to store in the local store.
+ * @private
+ */
+GoogleIo.prototype.addToLocalStorage_ = function(key, value) {
+ if (typeof(window['localStorage']) !== 'undefined' &&
+ typeof(window['JSON']) !== 'undefined' && localStorage && JSON) {
+ if (typeof(value) == 'object') {
+ value = JSON.stringify(value);
+ }
+ localStorage.setItem(key, value);
+ }
+};
+
+
+/**
+ * Detects if mobile and some mobile specific events.
+ * @private
+ */
+GoogleIo.prototype.isMobile_ = function() {
+ var logo = document.getElementById('io-logo');
+
+ if (logo && logo.offsetWidth == 265) {
+ this.setContentHeight();
+ var that = this;
+
+ this.map_.setOptions({
+ scaleControl: false
+ });
+
+ google.maps.event.addDomListener(window, 'resize', function() {
+ that.setContentHeight();
+ });
+ google.maps.event.addListener(this.map_, 'click', function() {
+ that.infoWindow_.close();
+ });
+
+ google.maps.event.addDomListenerOnce(window, 'load', function() {
+ window.setTimeout(function() {
+ window.scrollTo(0, 1);
+ }, 200);
+ });
+ }
+};
+
+
+/**
+ * Converts a name to id
+ *
+ * @param {string} name The name to convert.
+ * @return {string} id A nice id.
+ * @private
+ */
+GoogleIo.prototype.nameToId_ = function(name) {
+ return name.toLowerCase().replace(/[^a-z0-9-_]/ig, '');
+};
+
+
+/**
+ * Sets the height of the content area so that the map takes up all the
+ * available height.
+ */
+GoogleIo.prototype.setContentHeight = function() {
+ var height = document.body.clientHeight;
+ var topHeight = document.getElementById('top').clientHeight;
+ var bottomHeight = document.getElementById('bottom').clientHeight;
+ var mapCanvas = document.getElementById('map-canvas');
+
+ mapCanvas.style.height = (height - topHeight - bottomHeight + 30) + 'px';
+ google.maps.event.trigger(this.map_, 'resize');
+};
+
+
+/**
+ * Check the location hash and update if neeed.
+ *
+ * @param {boolean} force To force the location hash update.
+ * @private
+ */
+GoogleIo.prototype.checkLocationHash_ = function(force) {
+ var hash = document.location.hash;
+
+ if (force || this.currentHash_ != hash) {
+ this.currentHash_ = hash;
+
+ var match = hash.match(/level(\d)(?:\:([\w-]+))?/);
+
+ if (match && match[1]) {
+ if (force || this.currentLevel_ != match[1]) {
+ this.showLevel(match[1], false, force);
+ }
+
+ if (match[2] && this.mallMapContent_) {
+ for (var i = 0, content; content = this.mallMapContent_[i]; i++) {
+ if (content.id == match[2]) {
+ this.openContentInfo(content);
+ break;
+ }
+ }
+ } else {
+ this.closeInfoWindow();
+ }
+ }
+ }
+};
+
+
+/**
+ * Close the info window
+ */
+GoogleIo.prototype.closeInfoWindow = function() {
+ this.infoWindow_.close();
+};
+
+
+/**
+ * Trim whitespace from a string
+ *
+ * @param {string} s The string to trim.
+ * @return {string} A trimmed string.
+ */
+GoogleIo.prototype.trim = function(s) {
+ return s.replace(/(^\s+)|(\s+$)/g, '');
+};
+
+
+/**
+ * Creates the markers for each room and sandbox.
+ * @private
+ */
+GoogleIo.prototype.addLevelMarkers_ = function() {
+ for (var i = 0, level; level = this.LEVELS_[i]; i++) {
+ var id = 'LEVEL' + level;
+ var rooms = this.LOCATIONS[id];
+
+ for (var room in rooms) {
+ var info = rooms[room];
+
+ info.id = room;
+ if (info.type) {
+ var marker = this.createContentMarker_(info);
+
+ this.markers_[id].push(marker);
+ }
+ }
+ }
+};
+
+
+/**
+ * Loads the Mall maps content.
+ *
+ * @private
+ */
+GoogleIo.prototype.loadMallMapContent_ = function() {
+ // Initiate a JSONP request.
+ var that = this;
+
+ // Add a exposed call back function
+ window['loadSessionsCallback'] = function(json) {
+ that.loadSessionsCallback(json);
+ }
+
+ // Add a exposed call back function
+ window['loadSandboxCallback'] = function(json) {
+ that.loadSandboxCallback(json);
+ }
+
+ var key = 't0bDxnEqbFO4XuYpkA070Nw';
+ var worksheetIDs = {
+ 'sessions': 'od6',
+ 'sandbox': 'od5'
+ };
+ var jsonpUrl = 'http://spreadsheets.google.com/feeds/list/' +
+ key + '/' + worksheetIDs.sessions + '/public/values' +
+ '?alt=json-in-script&callback=loadSessionsCallback';
+ var script = document.createElement('script');
+
+ script.setAttribute('src', jsonpUrl);
+ script.setAttribute('type', 'text/javascript');
+ document.documentElement.firstChild.appendChild(script);
+
+ jsonpUrl = 'http://spreadsheets.google.com/feeds/list/' +
+ key + '/' + worksheetIDs.sandbox + '/public/values' +
+ '?alt=json-in-script&callback=loadSandboxCallback';
+ script = document.createElement('script');
+
+ script.setAttribute('src', jsonpUrl);
+ script.setAttribute('type', 'text/javascript');
+ document.documentElement.firstChild.appendChild(script);
+};
+
+
+/**
+ * Converts a time to 24 hour time.
+ * @param {string} time A time string in 12 hour format.
+ * @return {string} A time in 24 hour format.
+ * @private
+ */
+GoogleIo.prototype.convertTo24Hour_ = function(time) {
+ var pm = time.indexOf('pm') != -1;
+
+ time = time.replace(/[am|pm]/ig, '');
+ if (pm) {
+ var bits = time.split(':');
+ var hr = parseInt(bits[0], 10);
+
+ if (hr < 12) {
+ time = (hr + 12) + ':' + bits[1];
+ }
+ }
+
+ return time;
+};
+
+
+/**
+ * The callback for when the map json is loaded.
+ *
+ * @param {Object} json The json object with the map content.
+ */
+GoogleIo.prototype.loadSandboxCallback = function(json) {
+ var updated = json.feed.updated.$t;
+ var lastUpdated = this.getFromLocalStorage_('sandboxUpdated');
+ var sandbox = this.getFromLocalStorage_('sandbox');
+
+ if (updated == lastUpdated && sandbox) {
+ return;
+ }
+
+ var contentItems = [];
+ var entries = json.feed.entry;
+
+ for (var i = 0, entry; entry = entries[i]; i++) {
+ contentItems.push({
+ companyName: entry.gsx$companyname.$t,
+ companyDesc: entry.gsx$companydesc.$t,
+ companyUrl: entry.gsx$companyurl.$t,
+ pod: this.nameToId_(entry.gsx$companypod.$t)
+ });
+ }
+
+ this.sandboxItems_ = contentItems;
+ this.addToLocalStorage_('sandbox', contentItems);
+ this.addToLocalStorage_('sandboxUpdated', updated);
+
+ this.checkLocationHash_(true);
+};
+
+
+/**
+ * The callback for when the map json is loaded.
+ *
+ * @param {Object} json The json object with the map content.
+ */
+GoogleIo.prototype.loadSessionsCallback = function(json) {
+ var updated = json.feed.updated.$t;
+ var lastUpdated = this.getFromLocalStorage_('sessionsUpdated');
+ var sessions = this.getFromLocalStorage_('sessions');
+
+ if (updated == lastUpdated && sessions) {
+ return;
+ }
+
+ var contentItems = [];
+ var entries = json.feed.entry;
+
+ for (var i = 0, entry; entry = entries[i]; i++) {
+ var item = {
+ sessionDate: entry.gsx$sessiondate.$t,
+ sessionTime: entry.gsx$sessiontime.$t,
+ room: this.nameToId_(entry.gsx$room.$t),
+ product: entry.gsx$product.$t,
+ track: entry.gsx$track.$t,
+ waveId: entry.gsx$waveid.$t,
+ sessionTitle: entry.gsx$sessiontitle.$t,
+ sessionLink: entry.gsx$sessionlink.$t,
+ sessionSpeakers: entry.gsx$sessionspeakers.$t,
+ sessionAbstract: entry.gsx$sessionabstract.$t
+ };
+
+ if (item.sessionDate.indexOf('19') != -1) {
+ item.sessionDay = 19;
+ } else {
+ item.sessionDay = 20;
+ }
+
+ var timeParts = item.sessionTime.split('-');
+
+ item.sessionStart = this.convertTo24Hour_(timeParts[0]);
+ item.sessionEnd = this.convertTo24Hour_(timeParts[1]);
+
+ contentItems.push(item);
+ }
+
+ this.addToLocalStorage_('sessions', contentItems);
+ this.addToLocalStorage_('sessionsUpdated', updated);
+ this.sessionItems_ = contentItems;
+ this.checkLocationHash_(true);
+};
+
+
+/**
+ * Create a marker with the content item's correct icon.
+ *
+ * @param {Object} item The content item for the marker.
+ * @return {google.maps.Marker} The new marker.
+ * @private
+ */
+GoogleIo.prototype.createContentMarker_ = function(item) {
+ var image = new google.maps.MarkerImage(
+ 'images/marker-' + item.icon + '.png',
+ new google.maps.Size(30, 28),
+ new google.maps.Point(0, 0),
+ new google.maps.Point(13, 26));
+
+ var shadow = new google.maps.MarkerImage(
+ 'images/marker-shadow.png',
+ new google.maps.Size(30, 28),
+ new google.maps.Point(0, 0),
+ new google.maps.Point(13, 26));
+
+ var latLng = new google.maps.LatLng(item.lat, item.lng);
+ var marker = new google.maps.Marker({
+ position: latLng,
+ shadow: shadow,
+ icon: image,
+ title: item.title,
+ zIndex: this.markerIndex_
+ });
+ var that = this;
+
+ google.maps.event.addListener(marker, 'click', function() {
+ that.openContentInfo(item);
+ });
+
+ return marker;
+};
+
+
+/**
+ * Open a info window for a content item.
+ *
+ * @param {Object} item A content item that was read from the IO speradher that
+ * contains a type, id and title.
+ */
+GoogleIo.prototype.openContentInfo = function(item) {
+ if (this.hasMapContainer_()) {
+ MAP_CONTAINER.openContentInfo(item.id);
+ return;
+ }
+
+ var now = new Date();
+ var may20 = new Date('May 20, 2010');
+ var day = now < may20 ? 19 : 20;
+ var type = item.type;
+ var id = item.id;
+ var title = item.title;
+ var content = ['<div class="infowindow">'];
+ var sessions = [];
+ var empty = true;
+
+ if (item.type == 'session' && this.sessionItems_) {
+ if (day == 19) {
+ content.push('<h3>' + title + ' - Wednesday May 19</h3>');
+ } else {
+ content.push('<h3>' + title + ' - Thursday May 20</h3>');
+ }
+
+ for (var i = 0, session; session = this.sessionItems_[i]; i++) {
+ if (session.room == item.id && session.sessionDay == day) {
+ sessions.push(session);
+ empty = false;
+ }
+ }
+
+ sessions = sessions.sort(this.sortSessions_);
+
+ for (var i = 0, session; session = sessions[i]; i++) {
+ content.push('<div class="session"><div class="session-time">' +
+ session.sessionTime + '</div><div class="session-title"><a href="' +
+ this.SESSION_BASE_ + session.sessionLink + '.html">' +
+ session.sessionTitle + '</a></div></div>');
+ }
+ }
+
+ if (item.type == 'sandbox' && this.sandboxItems_) {
+ content.push('<h3>' + item.name + '</h3>');
+ content.push('<div class="sandbox">');
+ for (var i = 0, sandbox; sandbox = this.sandboxItems_[i]; i++) {
+ if (sandbox.pod == item.id) {
+ content.push('<div class="sandbox-items"><a href="http://' +
+ sandbox.companyUrl + '">' + sandbox.companyName + '</a></div>');
+ empty = false;
+ }
+ }
+ content.push('</div>');
+ }
+
+ if (item.type == 'officehours' && this.officeHoursItems_) {
+ if (day == 19) {
+ content.push('<h3>Office Hours - Wednesday May 19</h3>');
+ } else {
+ content.push('<h3>Office Hours - Thursday May 20</h3>');
+ }
+ empty = false;
+
+ var items = this.officeHoursItems_[day];
+
+ for (var time in items) {
+ content.push('<div class="session"><div class="session-time">' +
+ time + '</div><div class="session-products">');
+ for (var i = 0, product; product = items[time][i]; i++) {
+ content.push('<div>' + product + '</div>');
+ }
+ content.push('</div></div>');
+ }
+ }
+
+ if (empty) {
+ return;
+ }
+
+ content.push('</div>');
+
+ var pos = new google.maps.LatLng(item.lat, item.lng);
+
+ this.infoWindow_.setContent(content.join(''));
+ this.infoWindow_.setPosition(pos);
+ this.infoWindow_.open(this.map_);
+
+ var that = this;
+
+ google.maps.event.addListenerOnce(this.infoWindow_, 'closeclick', function() {
+ that.updateLocationHash(that.currentLevel_);
+ });
+};
+
+
+/**
+ * Custom sort function for sessions
+ * @param {string} a Session a.
+ * @param {string} b Session b.
+ * @return {number} 1 if greater, -1 if less, 0 if equal.
+ * @private
+ */
+GoogleIo.prototype.sortSessions_ = function(a, b) {
+ var aStart = parseInt(a.sessionStart.replace(':', ''), 10);
+ var bStart = parseInt(b.sessionStart.replace(':', ''), 10);
+
+ return ((aStart < bStart) ? -1 : ((aStart > bStart) ? 1 : 0));
+};
+
+
+/**
+ * Shows the toolbox and add the events to the level buttons.
+ * @private
+ */
+GoogleIo.prototype.enableToolbox_ = function() {
+ var toolbox = document.getElementById('toolbox');
+ var btnLevel1 = document.getElementById('btn-level1');
+ var btnLevel2 = document.getElementById('btn-level2');
+ var btnLevel3 = document.getElementById('btn-level3');
+ var myLocation = document.getElementById('my-location');
+ var that = this;
+
+ toolbox.className = toolbox.className.replace('hide', '');
+
+ google.maps.event.addDomListener(btnLevel1, 'click', function(e) {
+ that.handleLevelClick_(e);
+ });
+
+ google.maps.event.addDomListener(btnLevel2, 'click', function(e) {
+ that.handleLevelClick_(e);
+ });
+
+ google.maps.event.addDomListener(btnLevel3, 'click', function(e) {
+ that.handleLevelClick_(e);
+ });
+
+ if (myLocation) {
+ google.maps.event.addDomListener(myLocation, 'click', function(e) {
+ that.handleMyLocationClick_(e);
+ });
+ }
+};
+
+
+/**
+ * Handles the click of a level button.
+ *
+ * @param {Event} e The event.
+ * @private
+ */
+GoogleIo.prototype.handleMyLocationClick_ = function(e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ this.map_.setCenter(this.userPosition_);
+ this.showLevel(this.userLevel_, true);
+};
+
+
+/**
+ * Handles the click of a level button.
+ *
+ * @param {boolean} show To show or not.
+ * @private
+ */
+GoogleIo.prototype.toggleMyLocationButton_ = function(show) {
+ var myLocation = document.getElementById('my-location');
+
+ if (show) {
+ myLocation.className = myLocation.className.replace('hide', '');
+ } else {
+ myLocation.className += ' hide';
+ }
+};
+
+
+/**
+ * Handles the click of a level button.
+ *
+ * @param {Event} e The event.
+ * @private
+ */
+GoogleIo.prototype.handleLevelClick_ = function(e) {
+ e.stopPropagation();
+ e.preventDefault();
+
+ var link = e.currentTarget;
+ var level = link.id.replace('btn-level', '');
+
+ this.showLevel(level, true);
+};
+
+
+/**
+ * Updates the location hash.
+ *
+ * @param {string} level The level of the map.
+ * @param {string} opt_id The id of the marker (optional).
+ */
+GoogleIo.prototype.updateLocationHash = function(level, opt_id) {
+ document.location.hash = 'level' + level + (opt_id ? ':' + opt_id : '');
+};
+
+
+/**
+ * Sets a level to show.
+ *
+ * @param {string} level The level of the map.
+ * @param {boolean?} opt_updateHash Whether to update the hash (optional).
+ * @param {boolean?} opt_force Whether to force the update or not (optional).
+ */
+GoogleIo.prototype.showLevel = function(level, opt_updateHash, opt_force) {
+ if (!opt_force && level == this.currentLevel_) {
+ // Already on this level so do nothing;
+ return;
+ }
+
+ var prevLevel = this.currentLevel_;
+ var prevLevelBtn = document.getElementById('btn-level' + this.currentLevel_);
+ var currentLevelBtn = document.getElementById('btn-level' + level);
+
+ if (prevLevelBtn) {
+ prevLevelBtn.className = prevLevelBtn.className.replace(/selected/, '');
+ }
+
+ if (currentLevelBtn) {
+ currentLevelBtn.className += ' selected';
+ }
+
+ this.currentLevel_ = parseInt(level, 10);
+
+ if (this.map_.overlayMapTypes.length != 0) {
+ this.map_.overlayMapTypes.removeAt(0);
+ }
+
+ if (this.userLocationMarker_) {
+ var image;
+
+ if (this.currentLevel_ == this.userLevel_) {
+ image = new google.maps.MarkerImage(
+ 'images/my_location.png',
+ new google.maps.Size(14, 14),
+ new google.maps.Point(0, 0));
+ } else {
+ image = new google.maps.MarkerImage(
+ 'images/my_location_diff.png',
+ new google.maps.Size(14, 14),
+ new google.maps.Point(0, 0));
+ }
+
+ this.userLocationMarker_.setIcon(image);
+ }
+
+ this.addMallMapOverlay_();
+
+ if (this.markers_) {
+ if (prevLevel) {
+ var key = 'LEVEL' + prevLevel;
+
+ for (var i = 0, marker; marker = this.markers_[key][i]; i++) {
+ marker.setMap(null);
+ }
+ }
+
+ for (var i = 0, marker; marker = this.markers_['LEVEL' + level][i]; i++) {
+ marker.setMap(this.map_);
+ }
+ }
+
+ this.closeInfoWindow();
+ if (opt_updateHash && !this.hasMapContainer_()) {
+ this.updateLocationHash(level);
+ }
+};
+
+
+/**
+ * Add the mall floor overlay to the map.
+ *
+ * @private
+ */
+GoogleIo.prototype.addMallMapOverlay_ = function() {
+ var that = this;
+ var overlay = new google.maps.ImageMapType({
+ getTileUrl: function(coord, zoom) {
+ return that.getTileUrl(coord, zoom);
+ },
+ tileSize: new google.maps.Size(256, 256),
+ isPng: true
+ });
+
+ this.map_.overlayMapTypes.insertAt(0, overlay);
+};
+
+
+/**
+ * Gets the correct tile url for the coordinates and zoom.
+ *
+ * @param {google.maps.Point} coord The coordinate of the tile.
+ * @param {Number} zoom The current zoom level.
+ * @return {string} The url to the tile.
+ */
+GoogleIo.prototype.getTileUrl = function(coord, zoom) {
+ // Ensure that the requested resolution exists for this tile layer.
+ if (this.MIN_RESOLUTION_ > zoom || zoom > this.MAX_RESOLUTION_) {
+ return '';
+ }
+
+ // Ensure that the requested tile x,y exists.
+ if ((this.RESOLUTION_BOUNDS_[zoom][0][0] > coord.x ||
+ coord.x > this.RESOLUTION_BOUNDS_[zoom][0][1]) ||
+ (this.RESOLUTION_BOUNDS_[zoom][1][0] > coord.y ||
+ coord.y > this.RESOLUTION_BOUNDS_[zoom][1][1])) {
+ return '';
+ }
+
+ var template = this.TILE_TEMPLATE_URL_;
+
+ if (16 <= zoom && zoom <= 17) {
+ template = this.SIMPLE_TILE_TEMPLATE_URL_;
+ }
+
+ template = template.replace('{L}', this.currentLevel_).replace('{Z}',
+ zoom).replace('{X}', coord.x).replace('{Y}', coord.y);
+ return template;
+};
+
+
+/**
+ * Sets the users location on the map.
+ * @param {string} lat The users lat position.
+ * @param {string} lng The users lng position.
+ * @param {string} level The level that the user is on.
+ * @param {boolean} opt_center To center on the user or not.
+ * @param {booelan} opt_showLevel To change the level or not.
+ */
+GoogleIo.prototype.setUserLocation = function(lat, lng, level, opt_center,
+ opt_showLevel) {
+ if (!this.userLocationMarker_) {
+ var image = new google.maps.MarkerImage(
+ 'images/my_location.png',
+ new google.maps.Size(14, 14),
+ new google.maps.Point(0, 0));
+
+ this.userLocationMarker_ = new google.maps.Marker({
+ icon: image,
+ zIndex: this.userIndex_
+ });
+ } else {
+ if (this.currentLevel_ == level) {
+ image = new google.maps.MarkerImage(
+ 'images/my_location.png',
+ new google.maps.Size(14, 14),
+ new google.maps.Point(0, 0));
+ } else {
+ image = new google.maps.MarkerImage(
+ 'images/my_location_diff.png',
+ new google.maps.Size(14, 14),
+ new google.maps.Point(0, 0));
+ }
+ this.userLocationMarker_.setIcon(image);
+ }
+ <