Merge branch 'master' of http://khuhub.khu.ac.kr/2017103963/OpenSource_Project
Showing
7 changed files
with
350 additions
and
198 deletions
.idea/workspace.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="ChangeListManager"> | ||
4 | + <list default="true" id="4fb88dcd-e8f6-48b2-aba2-c7d407514a54" name="Default Changelist" comment=""> | ||
5 | + <change beforePath="$PROJECT_DIR$/public/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/public/index.html" afterDir="false" /> | ||
6 | + </list> | ||
7 | + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> | ||
8 | + <option name="SHOW_DIALOG" value="false" /> | ||
9 | + <option name="HIGHLIGHT_CONFLICTS" value="true" /> | ||
10 | + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | ||
11 | + <option name="LAST_RESOLUTION" value="IGNORE" /> | ||
12 | + </component> | ||
13 | + <component name="FUSProjectUsageTrigger"> | ||
14 | + <session id="-1867001403"> | ||
15 | + <usages-collector id="statistics.lifecycle.project"> | ||
16 | + <counts> | ||
17 | + <entry key="project.closed" value="1" /> | ||
18 | + <entry key="project.open.time.4" value="1" /> | ||
19 | + <entry key="project.opened" value="1" /> | ||
20 | + </counts> | ||
21 | + </usages-collector> | ||
22 | + <usages-collector id="statistics.file.extensions.open"> | ||
23 | + <counts> | ||
24 | + <entry key="LICENSE" value="1" /> | ||
25 | + <entry key="html" value="1" /> | ||
26 | + </counts> | ||
27 | + </usages-collector> | ||
28 | + <usages-collector id="statistics.file.types.open"> | ||
29 | + <counts> | ||
30 | + <entry key="HTML" value="1" /> | ||
31 | + <entry key="PLAIN_TEXT" value="1" /> | ||
32 | + </counts> | ||
33 | + </usages-collector> | ||
34 | + <usages-collector id="statistics.file.extensions.edit"> | ||
35 | + <counts> | ||
36 | + <entry key="html" value="2" /> | ||
37 | + </counts> | ||
38 | + </usages-collector> | ||
39 | + <usages-collector id="statistics.file.types.edit"> | ||
40 | + <counts> | ||
41 | + <entry key="HTML" value="2" /> | ||
42 | + </counts> | ||
43 | + </usages-collector> | ||
44 | + </session> | ||
45 | + </component> | ||
46 | + <component name="FileEditorManager"> | ||
47 | + <leaf> | ||
48 | + <file pinned="false" current-in-tab="true"> | ||
49 | + <entry file="file://$PROJECT_DIR$/public/index.html"> | ||
50 | + <provider selected="true" editor-type-id="text-editor"> | ||
51 | + <state relative-caret-position="619"> | ||
52 | + <caret line="215" column="18" selection-start-line="215" selection-start-column="18" selection-end-line="215" selection-end-column="18" /> | ||
53 | + </state> | ||
54 | + </provider> | ||
55 | + </entry> | ||
56 | + </file> | ||
57 | + </leaf> | ||
58 | + </component> | ||
59 | + <component name="Git.Settings"> | ||
60 | + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> | ||
61 | + </component> | ||
62 | + <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
63 | + <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> | ||
64 | + <component name="JsGulpfileManager"> | ||
65 | + <detection-done>true</detection-done> | ||
66 | + <sorting>DEFINITION_ORDER</sorting> | ||
67 | + </component> | ||
68 | + <component name="ProjectFrameBounds"> | ||
69 | + <option name="y" value="23" /> | ||
70 | + <option name="width" value="1120" /> | ||
71 | + <option name="height" value="1027" /> | ||
72 | + </component> | ||
73 | + <component name="ProjectView"> | ||
74 | + <navigator currentView="Scope" currentSubView="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope" proportions="" version="1"> | ||
75 | + <foldersAlwaysOnTop value="true" /> | ||
76 | + </navigator> | ||
77 | + <panes> | ||
78 | + <pane id="ProjectPane" /> | ||
79 | + <pane id="Scope"> | ||
80 | + <subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope"> | ||
81 | + <expand> | ||
82 | + <path> | ||
83 | + <item name="OpenSource_Project" type="3d21c010:ScopeViewTreeModel$ProjectNode" /> | ||
84 | + <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" /> | ||
85 | + </path> | ||
86 | + <path> | ||
87 | + <item name="OpenSource_Project" type="3d21c010:ScopeViewTreeModel$ProjectNode" /> | ||
88 | + <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" /> | ||
89 | + <item name="public" type="9f88c78c:ScopeViewTreeModel$FileNode" /> | ||
90 | + </path> | ||
91 | + </expand> | ||
92 | + <select /> | ||
93 | + </subPane> | ||
94 | + </pane> | ||
95 | + </panes> | ||
96 | + </component> | ||
97 | + <component name="PropertiesComponent"> | ||
98 | + <property name="WebServerToolWindowFactoryState" value="false" /> | ||
99 | + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | ||
100 | + </component> | ||
101 | + <component name="RunDashboard"> | ||
102 | + <option name="ruleStates"> | ||
103 | + <list> | ||
104 | + <RuleState> | ||
105 | + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> | ||
106 | + </RuleState> | ||
107 | + <RuleState> | ||
108 | + <option name="name" value="StatusDashboardGroupingRule" /> | ||
109 | + </RuleState> | ||
110 | + </list> | ||
111 | + </option> | ||
112 | + </component> | ||
113 | + <component name="SvnConfiguration"> | ||
114 | + <configuration /> | ||
115 | + </component> | ||
116 | + <component name="TaskManager"> | ||
117 | + <task active="true" id="Default" summary="Default task"> | ||
118 | + <changelist id="4fb88dcd-e8f6-48b2-aba2-c7d407514a54" name="Default Changelist" comment="" /> | ||
119 | + <created>1544527165116</created> | ||
120 | + <option name="number" value="Default" /> | ||
121 | + <option name="presentableId" value="Default" /> | ||
122 | + <updated>1544527165116</updated> | ||
123 | + <workItem from="1544527168977" duration="145000" /> | ||
124 | + </task> | ||
125 | + <servers /> | ||
126 | + </component> | ||
127 | + <component name="TimeTrackingManager"> | ||
128 | + <option name="totallyTimeSpent" value="145000" /> | ||
129 | + </component> | ||
130 | + <component name="ToolWindowManager"> | ||
131 | + <frame x="0" y="23" width="1120" height="1027" extended-state="0" /> | ||
132 | + <editor active="true" /> | ||
133 | + <layout> | ||
134 | + <window_info id="Favorites" side_tool="true" /> | ||
135 | + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24931756" /> | ||
136 | + <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> | ||
137 | + <window_info anchor="bottom" id="Docker" show_stripe_button="false" /> | ||
138 | + <window_info anchor="bottom" id="Version Control" /> | ||
139 | + <window_info anchor="bottom" id="Terminal" /> | ||
140 | + <window_info anchor="bottom" id="Event Log" side_tool="true" /> | ||
141 | + <window_info anchor="bottom" id="Message" order="0" /> | ||
142 | + <window_info anchor="bottom" id="Find" order="1" /> | ||
143 | + <window_info anchor="bottom" id="Run" order="2" /> | ||
144 | + <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> | ||
145 | + <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> | ||
146 | + <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> | ||
147 | + <window_info anchor="bottom" id="TODO" order="6" /> | ||
148 | + <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> | ||
149 | + <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> | ||
150 | + <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> | ||
151 | + </layout> | ||
152 | + </component> | ||
153 | + <component name="TypeScriptGeneratedFilesManager"> | ||
154 | + <option name="version" value="1" /> | ||
155 | + </component> | ||
156 | + <component name="VcsContentAnnotationSettings"> | ||
157 | + <option name="myLimit" value="2678400000" /> | ||
158 | + </component> | ||
159 | + <component name="editorHistoryManager"> | ||
160 | + <entry file="file://$PROJECT_DIR$/public/LICENSE"> | ||
161 | + <provider selected="true" editor-type-id="text-editor" /> | ||
162 | + </entry> | ||
163 | + <entry file="file://$PROJECT_DIR$/public/index.html"> | ||
164 | + <provider selected="true" editor-type-id="text-editor"> | ||
165 | + <state relative-caret-position="619"> | ||
166 | + <caret line="215" column="18" selection-start-line="215" selection-start-column="18" selection-end-line="215" selection-end-column="18" /> | ||
167 | + </state> | ||
168 | + </provider> | ||
169 | + </entry> | ||
170 | + </component> | ||
171 | +</project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -42,43 +42,43 @@ | ... | @@ -42,43 +42,43 @@ |
42 | 42 | ||
43 | <!-- Sidebar --> | 43 | <!-- Sidebar --> |
44 | <ul class="sidebar navbar-nav"> | 44 | <ul class="sidebar navbar-nav"> |
45 | - | 45 | + |
46 | <li class="nav-item"> | 46 | <li class="nav-item"> |
47 | <a class="nav-link" href="index.html"> | 47 | <a class="nav-link" href="index.html"> |
48 | <i class="fas fa-map-marker"></i> | 48 | <i class="fas fa-map-marker"></i> |
49 | <span>Map</span> | 49 | <span>Map</span> |
50 | </a> | 50 | </a> |
51 | </li> | 51 | </li> |
52 | - | 52 | + |
53 | <li class="nav-item active"> | 53 | <li class="nav-item active"> |
54 | <a class="nav-link" href="Foods.html"> | 54 | <a class="nav-link" href="Foods.html"> |
55 | <i class="fas fa-utensils" area-hidden ="true"></i> | 55 | <i class="fas fa-utensils" area-hidden ="true"></i> |
56 | <span>Foods</span> | 56 | <span>Foods</span> |
57 | </a> | 57 | </a> |
58 | </li> | 58 | </li> |
59 | - | 59 | + |
60 | <li class="nav-item"> | 60 | <li class="nav-item"> |
61 | <a class="nav-link" href="Entertainment.html"> | 61 | <a class="nav-link" href="Entertainment.html"> |
62 | <i class="fas fa-gamepad"></i> | 62 | <i class="fas fa-gamepad"></i> |
63 | <span>Entertainment</span> | 63 | <span>Entertainment</span> |
64 | </a> | 64 | </a> |
65 | </li> | 65 | </li> |
66 | - | 66 | + |
67 | <li class="nav-item"> | 67 | <li class="nav-item"> |
68 | <a class="nav-link" href="Rooms.html"> | 68 | <a class="nav-link" href="Rooms.html"> |
69 | <i class="fas fa-bed"></i> | 69 | <i class="fas fa-bed"></i> |
70 | <span>Rooms</span> | 70 | <span>Rooms</span> |
71 | </a> | 71 | </a> |
72 | </li> | 72 | </li> |
73 | - | 73 | + |
74 | <li class="nav-item"> | 74 | <li class="nav-item"> |
75 | <a class="nav-link" href="Favorite.html"> | 75 | <a class="nav-link" href="Favorite.html"> |
76 | <i class="fas fa-heart"></i> | 76 | <i class="fas fa-heart"></i> |
77 | <span>Favorite</span> | 77 | <span>Favorite</span> |
78 | </a> | 78 | </a> |
79 | </li> | 79 | </li> |
80 | - | 80 | + |
81 | - | 81 | + |
82 | </ul> | 82 | </ul> |
83 | <div id="content-wrapper"> | 83 | <div id="content-wrapper"> |
84 | 84 | ||
... | @@ -187,7 +187,7 @@ | ... | @@ -187,7 +187,7 @@ |
187 | <i class="fas fa-angle-up"></i> | 187 | <i class="fas fa-angle-up"></i> |
188 | </a> | 188 | </a> |
189 | 189 | ||
190 | - | 190 | + |
191 | 191 | ||
192 | <!-- Bootstrap core JavaScript--> | 192 | <!-- Bootstrap core JavaScript--> |
193 | <script src="vendor/jquery/jquery.min.js"></script> | 193 | <script src="vendor/jquery/jquery.min.js"></script> | ... | ... |
... | @@ -24,7 +24,7 @@ | ... | @@ -24,7 +24,7 @@ |
24 | padding: 0; | 24 | padding: 0; |
25 | } | 25 | } |
26 | </style> | 26 | </style> |
27 | - | 27 | + |
28 | <!-- Bootstrap core CSS--> | 28 | <!-- Bootstrap core CSS--> |
29 | <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> | 29 | <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> |
30 | 30 | ||
... | @@ -49,233 +49,53 @@ | ... | @@ -49,233 +49,53 @@ |
49 | <i class="fas fa-bars"></i> | 49 | <i class="fas fa-bars"></i> |
50 | </button> | 50 | </button> |
51 | 51 | ||
52 | - | 52 | + |
53 | </nav> | 53 | </nav> |
54 | 54 | ||
55 | <div id="wrapper"> | 55 | <div id="wrapper"> |
56 | 56 | ||
57 | <!-- Sidebar --> | 57 | <!-- Sidebar --> |
58 | <ul class="sidebar navbar-nav"> | 58 | <ul class="sidebar navbar-nav"> |
59 | - | 59 | + |
60 | <li class="nav-item active"> | 60 | <li class="nav-item active"> |
61 | <a class="nav-link" href="index.html"> | 61 | <a class="nav-link" href="index.html"> |
62 | <i class="fas fa-map-marker"></i> | 62 | <i class="fas fa-map-marker"></i> |
63 | <span>Map</span> | 63 | <span>Map</span> |
64 | </a> | 64 | </a> |
65 | </li> | 65 | </li> |
66 | - | 66 | + |
67 | <li class="nav-item"> | 67 | <li class="nav-item"> |
68 | <a class="nav-link" href="Foods.html"> | 68 | <a class="nav-link" href="Foods.html"> |
69 | <i class="fas fa-utensils" area-hidden ="true"></i> | 69 | <i class="fas fa-utensils" area-hidden ="true"></i> |
70 | <span>Foods</span> | 70 | <span>Foods</span> |
71 | </a> | 71 | </a> |
72 | </li> | 72 | </li> |
73 | - | 73 | + |
74 | <li class="nav-item"> | 74 | <li class="nav-item"> |
75 | <a class="nav-link" href="Entertainment.html"> | 75 | <a class="nav-link" href="Entertainment.html"> |
76 | <i class="fas fa-gamepad"></i> | 76 | <i class="fas fa-gamepad"></i> |
77 | <span>Entertainment</span> | 77 | <span>Entertainment</span> |
78 | </a> | 78 | </a> |
79 | </li> | 79 | </li> |
80 | - | 80 | + |
81 | <li class="nav-item"> | 81 | <li class="nav-item"> |
82 | <a class="nav-link" href="Rooms.html"> | 82 | <a class="nav-link" href="Rooms.html"> |
83 | <i class="fas fa-bed"></i> | 83 | <i class="fas fa-bed"></i> |
84 | <span>Rooms</span> | 84 | <span>Rooms</span> |
85 | </a> | 85 | </a> |
86 | </li> | 86 | </li> |
87 | - | 87 | + |
88 | <li class="nav-item"> | 88 | <li class="nav-item"> |
89 | <a class="nav-link" href="Favorite.html"> | 89 | <a class="nav-link" href="Favorite.html"> |
90 | <i class="fas fa-heart"></i> | 90 | <i class="fas fa-heart"></i> |
91 | <span>Favorite</span> | 91 | <span>Favorite</span> |
92 | </a> | 92 | </a> |
93 | </li> | 93 | </li> |
94 | - | ||
95 | - </ul> | ||
96 | - | ||
97 | - <div id="content-wrapper"> | ||
98 | - | ||
99 | - <script> | ||
100 | - // This example requires the Places library. Include the libraries=places | ||
101 | - // parameter when you first load the API. For example: | ||
102 | - // <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"> | ||
103 | - | ||
104 | - var map; | ||
105 | - var infowindow; | ||
106 | - | ||
107 | - function initMap() { | ||
108 | - map = new google.maps.Map(document.getElementById('map'), { | ||
109 | - center: {lat: -34.397, lng: 150.644}, | ||
110 | - zoom: 17 | ||
111 | - }); | ||
112 | - infowindow = new google.maps.InfoWindow(); | ||
113 | - | ||
114 | - | ||
115 | - // Try HTML5 geolocation. | ||
116 | - if (navigator.geolocation) { | ||
117 | - navigator.geolocation.getCurrentPosition(function(position) { | ||
118 | - var pos = { | ||
119 | - lat: position.coords.latitude, | ||
120 | - lng: position.coords.longitude | ||
121 | - }; | ||
122 | - | ||
123 | - map.setCenter(pos); | ||
124 | - | ||
125 | - | ||
126 | - var service = new google.maps.places.PlacesService(map); | ||
127 | - | ||
128 | - service.nearbySearch({ | ||
129 | - location: pos, | ||
130 | - radius: 500, | ||
131 | - type: ['bakery'] | ||
132 | - }, callback_foods); | ||
133 | - | ||
134 | - service.nearbySearch({ | ||
135 | - location: pos, | ||
136 | - radius: 500, | ||
137 | - type: ['bar'] | ||
138 | - }, callback_foods); | ||
139 | - | ||
140 | - service.nearbySearch({ | ||
141 | - location: pos, | ||
142 | - radius: 500, | ||
143 | - type: ['cafe'] | ||
144 | - }, callback_foods); | ||
145 | - | ||
146 | - service.nearbySearch({ | ||
147 | - location: pos, | ||
148 | - radius: 500, | ||
149 | - type: ['department_store'] | ||
150 | - }, callback_entertainment); | ||
151 | - | ||
152 | - service.nearbySearch({ | ||
153 | - location: pos, | ||
154 | - radius: 500, | ||
155 | - type: ['lodging'] | ||
156 | - }, callback_rooms); | ||
157 | - | ||
158 | - service.nearbySearch({ | ||
159 | - location: pos, | ||
160 | - radius: 500, | ||
161 | - type: ['meal_delivery'] | ||
162 | - }, callback_foods); | ||
163 | - | ||
164 | - service.nearbySearch({ | ||
165 | - location: pos, | ||
166 | - radius: 500, | ||
167 | - type: ['meal_takeaway'] | ||
168 | - }, callback_foods); | ||
169 | - | ||
170 | - service.nearbySearch({ | ||
171 | - location: pos, | ||
172 | - radius: 500, | ||
173 | - type: ['movie_theater'] | ||
174 | - }, callback_entertainment); | ||
175 | - | ||
176 | - service.nearbySearch({ | ||
177 | - location: pos, | ||
178 | - radius: 500, | ||
179 | - type: ['museum'] | ||
180 | - }, callback_entertainment); | ||
181 | - | ||
182 | - service.nearbySearch({ | ||
183 | - location: pos, | ||
184 | - radius: 500, | ||
185 | - type: ['night_club'] | ||
186 | - }, callback_entertainment); | ||
187 | - | ||
188 | - | ||
189 | - service.nearbySearch({ | ||
190 | - location: pos, | ||
191 | - radius: 500, | ||
192 | - type: ['restaurant'] | ||
193 | - }, callback_foods); | ||
194 | - | ||
195 | - service.nearbySearch({ | ||
196 | - location: pos, | ||
197 | - radius: 500, | ||
198 | - type: ['shopping_mall'] | ||
199 | - }, callback_entertainment); | ||
200 | - | ||
201 | - service.nearbySearch({ | ||
202 | - location: pos, | ||
203 | - radius: 500, | ||
204 | - type: ['zoo'] | ||
205 | - }, callback_entertainment); | ||
206 | - | ||
207 | - }); | ||
208 | - } | ||
209 | - } | ||
210 | - function callback_foods(results, status) { | ||
211 | - if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
212 | - for (var i = 0; i < results.length; i++) { | ||
213 | - createMarker_foods(results[i]); | ||
214 | - } | ||
215 | - } | ||
216 | - } | ||
217 | - | ||
218 | - function callback_entertainment(results, status) { | ||
219 | - if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
220 | - for (var i = 0; i < results.length; i++) { | ||
221 | - createMarker_entertainment(results[i]); | ||
222 | - } | ||
223 | - } | ||
224 | - } | ||
225 | - | ||
226 | - function callback_rooms(results, status) { | ||
227 | - if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
228 | - for (var i = 0; i < results.length; i++) { | ||
229 | - createMarker_rooms(results[i]); | ||
230 | - } | ||
231 | - } | ||
232 | - } | ||
233 | - | ||
234 | 94 | ||
95 | + </ul> | ||
235 | 96 | ||
236 | - function createMarker_foods(place) { | 97 | + <div id="content-wrapper"> |
237 | - var marker = new google.maps.Marker({ | 98 | + <script type="text/javascript" src="js/getPlaceList.js"></script> |
238 | - map: map, | ||
239 | - position: place.geometry.location, | ||
240 | - icon : "./icons/restaurant-15.svg", | ||
241 | - //fillcolor : "#FF0000" | ||
242 | - }); | ||
243 | - | ||
244 | - google.maps.event.addListener(marker, 'click', function() { | ||
245 | - infowindow.setContent(place.name); | ||
246 | - infowindow.open(map, this); | ||
247 | - }); | ||
248 | - } | ||
249 | - | ||
250 | - function createMarker_entertainment(place) { | ||
251 | - var placeLoc = place.geometry.location; | ||
252 | - var marker = new google.maps.Marker({ | ||
253 | - map: map, | ||
254 | - position: place.geometry.location, | ||
255 | - icon : "./icons/gaming-15.svg" | ||
256 | - }); | ||
257 | - | ||
258 | - google.maps.event.addListener(marker, 'click', function() { | ||
259 | - infowindow.setContent(place.name); | ||
260 | - infowindow.open(map, this); | ||
261 | - }); | ||
262 | - } | ||
263 | - | ||
264 | - function createMarker_rooms(place) { | ||
265 | - var placeLoc = place.geometry.location; | ||
266 | - var marker = new google.maps.Marker({ | ||
267 | - map: map, | ||
268 | - position: place.geometry.location, | ||
269 | - icon : "./icons/lodging-15.svg" | ||
270 | - }); | ||
271 | - | ||
272 | - google.maps.event.addListener(marker, 'click', function() { | ||
273 | - infowindow.setContent(place.name); | ||
274 | - infowindow.open(map, this); | ||
275 | - }); | ||
276 | - } | ||
277 | - | ||
278 | - </script> | ||
279 | <div id="map"></div> | 99 | <div id="map"></div> |
280 | <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDg4CkUEEt_96n1ork1nL5t4E_SpdKrgMI&libraries=places&callback=initMap" async defer></script> | 100 | <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDg4CkUEEt_96n1ork1nL5t4E_SpdKrgMI&libraries=places&callback=initMap" async defer></script> |
281 | <!-- Sticky Footer --> | 101 | <!-- Sticky Footer --> | ... | ... |
public/js/getPlaceList.js
0 → 100644
1 | +var map; | ||
2 | +var pos; | ||
3 | +var infowindow; | ||
4 | +var service; | ||
5 | +var result_food = []; | ||
6 | +var result_entertainment = []; | ||
7 | +var result_room = []; | ||
8 | + | ||
9 | +export { pos as posiiton }; | ||
10 | +export { result_food as foodList }; | ||
11 | +export { result_entertainment as entList }; | ||
12 | +export { result_room as roomList }; | ||
13 | + | ||
14 | +function initMap() { | ||
15 | + map = new google.maps.Map(document.getElementById('map'), { | ||
16 | + center: {lat: -34.397, lng: 150.644}, | ||
17 | + zoom: 17 | ||
18 | + }); | ||
19 | + infowindow = new google.maps.InfoWindow(); | ||
20 | + | ||
21 | + | ||
22 | + // Try HTML5 geolocation. | ||
23 | + if (navigator.geolocation) { | ||
24 | + navigator.geolocation.getCurrentPosition(function(position) { | ||
25 | + pos = { | ||
26 | + lat: position.coords.latitude, | ||
27 | + lng: position.coords.longitude | ||
28 | + }; | ||
29 | + | ||
30 | + map.setCenter(pos); | ||
31 | + | ||
32 | + service = new google.maps.places.PlacesService(map); | ||
33 | + | ||
34 | + service.nearbySearch({ | ||
35 | + location: pos, | ||
36 | + radius: 500, | ||
37 | + type: ['bakery'] | ||
38 | + }, callback_foods); | ||
39 | + | ||
40 | + searchPlace('bar','food'); | ||
41 | + searchPlace('cafe','food'); | ||
42 | + searchPlace('meal_delivery','food'); | ||
43 | + searchPlace('meal_takeaway','food'); | ||
44 | + searchPlace('restaurant','food'); | ||
45 | + | ||
46 | + | ||
47 | + searchPlace('department_store','entertainment'); | ||
48 | + searchPlace('movie_theater','entertainment'); | ||
49 | + searchPlace('museum','entertainment'); | ||
50 | + searchPlace('night_club','entertainment'); | ||
51 | + searchPlace('shopping_mall','entertainment'); | ||
52 | + searchPlace('zoo','entertainment'); | ||
53 | + | ||
54 | + searchPlace('lodging','room'); | ||
55 | + }); | ||
56 | + } | ||
57 | +} | ||
58 | + | ||
59 | +function searchPlace(str, placeType) { | ||
60 | + switch(placeType) { | ||
61 | + case 'food': | ||
62 | + service.nearbySearch({ | ||
63 | + location: pos, | ||
64 | + radius: 500, | ||
65 | + type: ['meal_takeaway'] | ||
66 | + }, callback_foods); | ||
67 | + break; | ||
68 | + case 'entertainment': | ||
69 | + service.nearbySearch({ | ||
70 | + location: pos, | ||
71 | + radius: 500, | ||
72 | + type: [str.toString()] | ||
73 | + }, callback_entertainment); | ||
74 | + break; | ||
75 | + case 'room': | ||
76 | + service.nearbySearch({ | ||
77 | + location: pos, | ||
78 | + radius: 500, | ||
79 | + type: ['lodging'] | ||
80 | + }, callback_rooms); | ||
81 | + break; | ||
82 | + default: | ||
83 | + break; | ||
84 | + } | ||
85 | +} | ||
86 | + | ||
87 | + | ||
88 | +function callback_foods(results, status) { | ||
89 | + if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
90 | + for (var i = 0; i < results.length; i++) { | ||
91 | + result_food.push(results[i]); | ||
92 | + createMarker_foods(results[i]); | ||
93 | + } | ||
94 | + } | ||
95 | +} | ||
96 | + | ||
97 | +function callback_entertainment(results, status) { | ||
98 | + if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
99 | + for (var i = 0; i < results.length; i++) { | ||
100 | + result_entertainment.push(results[i]); | ||
101 | + createMarker_entertainment(results[i]); | ||
102 | + } | ||
103 | + } | ||
104 | +} | ||
105 | + | ||
106 | +function callback_rooms(results, status) { | ||
107 | + if (status === google.maps.places.PlacesServiceStatus.OK) { | ||
108 | + for (var i = 0; i < results.length; i++) { | ||
109 | + result_room.push(results[i]); | ||
110 | + createMarker_rooms(results[i]); | ||
111 | + } | ||
112 | + } | ||
113 | +} | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | +function createMarker_foods(place) { | ||
118 | + var marker = new google.maps.Marker({ | ||
119 | + map: map, | ||
120 | + position: place.geometry.location, | ||
121 | + icon : "./icons/restaurant-15.svg", | ||
122 | + //fillcolor : "#FF0000" | ||
123 | + }); | ||
124 | + | ||
125 | + google.maps.event.addListener(marker, 'click', function() { | ||
126 | + infowindow.setContent(place.name); | ||
127 | + infowindow.open(map, this); | ||
128 | + }); | ||
129 | +} | ||
130 | + | ||
131 | +function createMarker_entertainment(place) { | ||
132 | + var placeLoc = place.geometry.location; | ||
133 | + var marker = new google.maps.Marker({ | ||
134 | + map: map, | ||
135 | + position: place.geometry.location, | ||
136 | + icon : "./icons/gaming-15.svg" | ||
137 | + }); | ||
138 | + | ||
139 | + google.maps.event.addListener(marker, 'click', function() { | ||
140 | + infowindow.setContent(place.name); | ||
141 | + infowindow.open(map, this); | ||
142 | + }); | ||
143 | +} | ||
144 | + | ||
145 | +function createMarker_rooms(place) { | ||
146 | + var placeLoc = place.geometry.location; | ||
147 | + var marker = new google.maps.Marker({ | ||
148 | + map: map, | ||
149 | + position: place.geometry.location, | ||
150 | + icon : "./icons/lodging-15.svg" | ||
151 | + }); | ||
152 | + | ||
153 | + google.maps.event.addListener(marker, 'click', function() { | ||
154 | + infowindow.setContent(place.name); | ||
155 | + infowindow.open(map, this); | ||
156 | + }); | ||
157 | +} |
public/js/showEnt.js
0 → 100644
1 | +import entList from 'getPlaceList' |
public/js/showFood.js
0 → 100644
public/js/showRoom.js
0 → 100644
1 | +import roomList from 'getPlaceList' |
-
Please register or login to post a comment