且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将Rails链接插入Google Maps信息窗口

更新时间:2022-02-12 03:34:14

我找到了另一种解决方案,从概念上讲可能会更容易一些-我可以在map.js文件中为每个位置构建适当的链接使用json数据包中输出的位置ID:

I've found another way to go about this that might be a bit easier conceptually - I can construct the appropriate link for each place in my map.js file using the place id outputted in the json packet:

<a href='/places/"+place.id+"'>Show more!</a>"

这似乎很好!