내 map.html.haml에서 spiderfier https://github.com/jawj/OverlappingMarkerSpiderfier와 https://github.com/apneadiving/Google-Maps-for-Railsspiderfier js와 gmaps4rails gem을 통합하는 방법은 무엇입니까? (같은 위도, LNG에 여러 마커)
을 통합하려고 조금 사투를 벌인거야 :
= gmaps(:markers => {:data => @map, :options => { "rich_marker" => true, :raw => '{ animation: google.maps.Animation.DROP }' } }, :map_options => { :draggable => true, :auto_zoom => false, :zoom => 9, :disableDefaultUI => false, :scrollwheel => true, :disableDoubleClickZoom => true, :custom_infowindow_class => "province" })
- content_for :scripts do
:javascript
Gmaps.map.infobox = function(boxText) {
return {
content: boxText
,disableAutoPan: false
,maxWidth: 0
,pixelOffset: new google.maps.Size(-140, -50)
,alignBottom: true
,zIndex: 999
,hideCloseButton: false
,boxStyle: {
background: "white"
,width: "280px"
,padding: "10px"
,border: "1px solid #b2b2b2"
,arrowStyle: 0
,arrowPosition: 50
,arrowSize: 20
}
,infoBoxClearance: new google.maps.Size(10, 10)
,isHidden: false
,pane: "floatPane"
,enableEventPropagation: false
}};
이 잘 작동하지만 어떻게 것 하나는 spiderfier https://github.com/jawj/OverlappingMarkerSpiderfier#how-to-use을 통합?
오늘 같은 문제가 발생했습니다. 그동안 해결책을 찾았습니까? 고마워요 –
안녕하세요 패트 릭, 아직 솔루션을 찾지 못했습니다, 만약 내가 할 경우 여기에 코멘트 것입니다 우선 순위 다행스럽게도 클라이언트를 위해 높지 않습니다. – Laurens