-
Notifications
You must be signed in to change notification settings - Fork 49
/
02-place-picker-example.js
46 lines (40 loc) · 1.05 KB
/
02-place-picker-example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function runExample2() {
$("#place-picker").mapsed({
// allow user to select somewhere
onSelect: function(m, details) {
var msg =
"Name: " + details.name +
"<br/>Address: " +
details.street + ", " +
details.town + ", " +
details.area + ", " +
details.postCode +
"<br/>website: " + details.website +
"<br/>more: " + details.url +
"<br/>Tel: " + details.telNo
;
if (details.place_id) {
msg += "<br/>Place_id: " + details.place_id
}
m.showMsg("Place selected!", msg);
// indicate tip should be closed
return true;
},
showOnLoad:
// City Varieties
{
// flag that this place should have the tooltip shown when the map is first loaded
autoShow: true,
lat: 53.798823,
lng:-1.5426760000000286,
place_id: "ChIJQd3IwBtceUgRha6laiANoro"
},
getFooterTemplate: function(marker, isEditing) {
// Same footer for view & edit template
return "<center>Selected from Google Places</center>";
},
}); // mapsed
}
$(document).ready(function() {
runExample2();
});