const btn = document.getElementById('btn');
const guide = document.getElementById('guide');

let flag = true;
btn.addEventListener('click', (e) =>{
    document.querySelector("#guide").style.display = flag ? "block" : "none";
    flag = !flag;
});

window.addEventListener('load', () => {
　const el = document.querySelector('[gps-entity-place]');
  console.log(el);
  el.addEventListener('gps-entity-place-update-positon', (event) => {
  　if(event.detail.distance < 10) {
    　el.setAttribute('material','color: red');
    　guide.setAttribute('display:block');
  　} else {
    　el.setAttribute('material','color: white');
    　guide.setAttribute('display:none');
  　}
  });
});
