Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想继续使用 gem 'gmaps4rails' 但使用 MarkerClustererPlus 而不是 MarkClusterer ...这可能吗?
由于语法似乎相同,您应该只禁用 js 文件的自动包含:
<%= gmaps( data_hash, true)
然后将这些文件自己添加到您的页面中,并包含 MarkerClustererPlus 而不是 drfault 。
在您的 Gemfile 中,添加以下行:
宝石'markerclustererplus-rails'
您可以通过将以下内容添加到您的 javascript 文件中来包含它:
//= 需要markerclusterer
参考 - https://github.com/RogerE/markerclustererplus-rails