小编Rah*_*Jat的帖子

具有多个停靠点/航点的 Google Maps Route API

我正在尝试使用 Google Maps API 在多个站点之间绘制源和目的地之间的路线。我将传递源、目的地和所有停靠点的纬度和日志值。我尝试使用基本代码段,但代码(如下)在每个停靠点之间绘制了一条路线。

[![<script type="text/javascript">
    var markers = [
            {
                "timestamp": 'Alibaug',
                "latitude": '18.641400',
                "longitude": '72.872200',
                "description": 'Alibaug is a coastal town and a municipal council in Raigad District in the Konkan region of Maharashtra, India.'
            },
            {
                "timestamp": 'Mumbai',
                "latitude": '18.964700',
                "longitude": '72.825800',
                "description": 'Mumbai formerly Bombay, is the capital city of the Indian state of Maharashtra.'
            }
        ,
            {
                "timestamp": 'Pune',
                "latitude": '18.523600',
                "longitude": '73.847800',
                "description": 'Pune is the seventh largest metropolis in India, the second …
Run Code Online (Sandbox Code Playgroud)

javascript jquery google-maps google-maps-api-3

2
推荐指数
1
解决办法
3730
查看次数

Javascript所有点都用空格替换(为什么我的代码不起作用)

我正在尝试全部取代。与空间。

我已经完成了正则表达式

var voice = "I am student of …… School"
voice = voice.replace(/(~|`|!|@|#|$|%|^|&|\*|\(|\)|{|}|\[|\]|;|:|\"|'|<|,|\.|>|\?|\/|\\|\||-|_|\+|=)/g, "");
console.log(voice)
Run Code Online (Sandbox Code Playgroud)

它返回 "I am a student of the .... university"

但我想要这样的字符串=> "I am a student of the university"

javascript

1
推荐指数
1
解决办法
92
查看次数