Examples
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> </head> <body> <div style="height: 500px; width: 500px"> <div id="app"> </div> </div> <button class = "btnFlyto" onclick="flyto()">Flyto </button> <script src="https://maps.fatos.biz/dist/fatosmap-gl.js"> </script> <script> let LatLng ={lat: 13.753815, lng: 100.501833} let mapInstance = new fatosmap.maps.Map( document.getElementById("app"), { zoom: 11, center: LatLng, service_id: 1, key: 'Please enter your key' } ) function flyto(){ mapInstance.flyTo ({ lat:13.695723, //must lng:100.751640, //must zoom: 15, //must speed: 1 //optional Default 2.5 }) }; </script> <style> .btnFlyto { position: relative; float: left; left: 0px; z-index:1; } </style> </body> </html>