按提交时,Google地图不会刷新标记
但是删除原始标记。我该如何解决
按下提交按钮后显示的标记。
以下是显示我到目前为止所做的代码
我试图删除尽可能多的代码,所以这个愚蠢的
进行过滤,请添加更多代码。
self.addEventListener('push', function(event) {
const obj = JSON.parse(event.data.text());
const title = obj.title;
const options = obj.options;
// options.actions = [{action: "get", title: "Get now."}];
// options.data = {
// time: new Date(Date.now()).toString(),
// message: 'Hello, World!'
// };
save();
const notificationPromise = self.registration.showNotification(title, options);
event.waitUntil(notificationPromise);
});
self.addEventListener('notificationclick', function(event) {
event.notification.close();
event.waitUntil(
clients.openWindow('http://localhost/')
);
});