javascript - 如何将路由从浏览器发送到另一台设备?

标签 javascript google-maps google-maps-api-3

我的应用程序形成路线使用google.map api,我想将此路线发送到汽车或手机\平板电脑,可以通过Google帐户(电子邮件),通过使用javascript的按钮; service.route 像这样:

    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);
    }
});

P.s.像这样的按钮,但是以编程方式 enter image description here

最佳答案

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

关于javascript - 如何将路由从浏览器发送到另一台设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38301162/

相关文章:

javascript - jQuery 动画内容 slider 循环

javascript - 正则表达式匹配字母和数字,除非存在三个连续(任何)字母

android - ClusterManager.clearItems() 不清除项目

javascript - 谷歌将API中心映射到正确的位置,但箭头指向不同的位置

css - 自定义谷歌地图标记图标

javascript - Extjs 函数未找到问题

javascript - 如何使用 Javascript 将照片上传到 Facebook?

javascript - 使用 Google map 和 Ruby 添加标记

javascript - Safari JS 语法错误 : Unexpected token '='

javascript - 无法关闭 Google map 中的远足路线图层