the beauty of mapping


Kode Iklan Disini

Monday, November 2, 2020

The Talking Map


This is belike completely pointless but I've simply used the Web Speech API to practice a Speaking Map. If y'all click anywhere on this map the address volition hold upwardly spoken out loud.

To expire the map to speak exclusively required i business of code (where the address is the opposite geo-coded address from clicking on the map). Here's the magic business of code:

var msg=new SpeechSynthesisUtterance(address);window.speechSynthesis.speak(msg);

The Web Speech API isn't widely supported withal - then to withdraw heed the map speak y'all volition convey to purpose a compliant browser. In this illustration y'all volition belike withdraw to sentiment the Speaking Map inwards Chrome. This map evidently isn't that useful but it would hold upwardly slowly to add together spoken language to directions in addition to practice your ain navigation system.