4

Spiderfier https://github.com/jawj/OverlappingMarkerSpiderfierhttps://github.com/apneadiving/Google-Maps-for-Railsと統合しようとして少し苦労しています

私のmap.html.hamlでは:

= 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をどのように統合しますか?

4

1 に答える 1