-
Notifications
You must be signed in to change notification settings - Fork 49
/
04-delete-places-example.js
50 lines (40 loc) · 1.16 KB
/
04-delete-places-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
46
47
48
function runExample4() {
$("#delete-places").mapsed({
showOnLoad: [
// City Varieties
{
autoShow: true,
canEdit: false,
canDelete: true,
lat: 53.798823,
lng:-1.5426760000000286,
name: "CITY Varieties Music Hall",
url: "https://plus.google.com/103655993956272197223/about?hl=en-GB",
website: "http://www.cityvarieties.co.uk/",
telNo: "0845 644 1881",
street: "Swan Street,",
town: "Leeds",
area: "West Yorkshire",
postCode: "LS1 6LW",
userData: 99
}
],
// Allows the user to delete a "custom" place they've previously
// ... added
onDelete: function(m, placeToDelete) {
m.showMsg(
"YOUR DELETE CODE HERE",
"<strong>" + placeToDelete.name + "(" + placeToDelete.userData + ")</strong> has been removed."
);
// here would be code your application to do the actual delete
// return true to confirm it was deleted OK and remove marker from the map
// return false if the delete failed
return true;
},
// Flag that we want the user to confirm the delete before we actually do it
confirmDelete: true
});
}
$(document).ready(function() {
runExample4();
});