Want to se something cool with Google Maps StreetView? :-)

Events happening in the community are now at Drupal community events on www.drupal.org.
tinem's picture

Try to select any toilet from København http://www.tinemuller.dk/test_drupal/node/6 and click on the link from InfoWindow Google Maps StreetView and then you will get directly to the toiletbuilding og from here you can choose Ruteplan, send link, see other photos an so.

Then try after this to click on the link from InfoWindow "here" and you will see more info about the toilet and also a link to the same StreetView.

I used most of the weekend at making this and I think it's really cool if I'm permitted to say so. :-)

To you that doesn't know how StreetView is functioning this video http://www.youtube.com/watch?v=f0y-q-pI2pQ is good.

Comments

Actually...

michelle's picture

What's cool to me is you've got a list on the left that controls the popups on the map. I've been wanting to do that for like 2 years and never figured out how. How did you do that?

Michelle

Yes, that looks great

ar-jan's picture

I second Michelle's question, and I think a post detailing the used modules and how you made it would be a good read!

I demand you tell us how you

ddorian's picture

I demand you tell us how you did it ... please?

@ddorian You might want to

Adam S's picture

@ddorian You might want to try playing with Gmap Tools Module first. http://drupal.org/project/gmaps Although it's a little more involved and not as developed at this point the same functionality can be achieved using Openlayers.module and finder.module.

I'll be building the views for my article and directory content in a couple of weeks and I will show you then what can be achieved. For reasons I don't know I erased my test/devel website.

Marine job board with Drupal 7 at http://windwardjobs.com

It seems like the question of

jcarnett's picture

It seems like the question of how to open an info bubble from another link on the page comes up a lot. The process of customizing maps from the GMap module pretty much always looks the same. Here's an example attaching a link in the "page_1" display of a view to the markers in an attached gmap display:

if (Drupal.gmap) {
  // Register our handler with the Gmap module
  Drupal.gmap.addHandler('gmap', function(elem) {
    var map = this;
    // Check for a specific map to customize, this ID is defined in the view, macro, or is otherwise generated for you
    if (map.vars.id == 'my_map_id') {
      // The "init" event is fired after the map is initialized
      map.bind('init', function() {
        // Click result list to open GMap marker
        // Attach to the result rows, you'll need to update this selector appropriately
        $('.view-my-view .view-inner-page_1 li.views-row').data('map', map).each(function(index, value) {
          if ($(this).data('map').vars.markers) {
            $(this).data('marker', $(this).data('map').vars.markers[index]);
            $(this).click(function(e) {
                e.preventDefault();
                $(this).data('map').change('clickmarker', -1, $(this).data('marker'));
                return false;
            });
          }
        });
      });
    }
  }
}

You can add the javascript in a module or in your theme -- it shouldn't matter as long as it comes after the GMap module's javascript. Don't forget to update it appropriately to fit your use case.

There are several events provide by the GMap module, or you can just call the Google API directly which is necessary in some cases as the GMap module doesn't provide any API for everything.

Looking forward

qtrimble's picture

Looking forward to giving this a try....

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: