Gmap3 - Forum

Gmap3 exchange platform

You are not logged in.

Ads
(server costs 27.50€ per month)

#1 2012-01-30 07:01:57

Ruaan
Member
Registered: 2012-01-30
Posts: 6

Adding streetview to Markers

How do you add panoramic streetview info windows to multiple markers ?

Offline

Ads
(server costs 27.50€ per month)

#2 2012-01-30 17:30:02

Ruaan
Member
Registered: 2012-01-30
Posts: 6

Re: Adding streetview to Markers

Here is the code for Markers but need to add the Panoramic info Window

 <script type="text/javascript">
        
      $(function(){
      
        $('#test1')
          .gmap3(
          { action:'init',
            options:{
              center:[46.578498,2.457275],
              zoom: 5
            }
          },
          { action: 'addMarkers',
            markers:[
              {lat:48.8620722, lng:2.352047, data:'Paris !'},
              {lat:46.59433,lng:0.342236, data:'Poitiers : great city !'},
              {lat:42.704931, lng:2.894697, data:'Perpignan ! <br> GO USAP !'}
            ],
            marker:{
              options:{
                draggable: false
              },
              events:{
                mouseover: function(marker, event, data){
                  var map = $(this).gmap3('get'),
                      infowindow = $(this).gmap3({action:'get', name:'infowindow'});
                  if (infowindow){
                    infowindow.open(map, marker);
                    infowindow.setContent(data);
                  } else {
                    $(this).gmap3({action:'addinfowindow', anchor:marker, options:{content: data}});
                  }
                },
                mouseout: function(){
                  var infowindow = $(this).gmap3({action:'get', name:'infowindow'});
                  if (infowindow){
                    infowindow.close();
                  }
                }
              }
            }
          }
        );
      });
    </script>

Offline

#3 2012-02-18 20:13:36

Ruaan
Member
Registered: 2012-01-30
Posts: 6

Re: Adding streetview to Markers

wow no help !!! awesome :-(

Offline

#4 2012-02-19 02:05:25

charlietfl
Moderator
Registered: 2011-11-24
Posts: 201

Re: Adding streetview to Markers

I believe you will need to loop over your marker array with jQuery and use 'addMarker' on each loop, you can then follow demo in examples

Offline

Board footer

Powered by FluxBB