简体   繁体   中英

How to send route from browser to another device?

my application forming route uses google.map api , and i want to send this route to car or phone\\tablet, possibility by Google account(e-mail), via button using javascript; service.route like this:

    service.route({
    origin: officeLocation,
    destination: officeLocation,
    waypoints: clientAdrArray,
    travelMode: google.maps.TravelMode.DRIVING,
    avoidTolls: true
}, function (response, status) {
    if (status === google.maps.DirectionsStatus.OK) {
        display.setDirections(response);
    } else {
        alert('ERROR: ' + status);
    }
});

Ps button like this, but programmatically 在此输入图像描述

要将数据从应用程序发送到客户端,您必须使用服务器,或将Backend用作FirebaseBackand等服务产品。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM