Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
233 views
in Technique[技术] by (71.8m points)

javascript - Laravel,如何使用Google Map Marker从javascript函数调用路由(Laravel, how to call route from javascript function, using Google Map Marker)

I'm trying to create a marker/direction pointer to route on the Google map, but I don't know how to.

(我正在尝试创建一个标记/方向指针以在Google地图上路由,但是我不知道该怎么做。)

I have added several markers with the information window, and within that window, the title should redirect me to a route.

(我在信息窗口中添加了几个标记,在该窗口中,标题应将我重定向到路线。)

I hope you can help me.

(我希望你能帮助我。)

Thank you very much!

(非常感谢你!)

:)

(:))

 var data = '{!! json_encode($destinos) !!}'; //console.log(data); data = JSON.parse(data); 

 //THIS IS THE HTML INFO IN THE MARKER function htmlInfo(name, descrip){ var text = ""; text += '<div class="content_maps">' ; text += '<a href="{{ route(\'destinos.detalle\', [\'id\' => data.id]) }}" ><h5>'+name+'</h5></a>' ; text += '<p>'+descrip+'</p>' ; text += '</div>'; return text; } 

  ask by Emerson translate from so


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...