Google Maps Extended Event (street view)


Does anyone know if it’s possible to fire off a workflow when the Google Maps Extender (map) view is changed to Street View?

I see you can run a workflow event when the event of the map changes, like this…

But I can’t figure out what to do next, just thought someone may know.

I see it may well be the ‘visible_changed’ event which is either true or false.

@AliFarahat would you mind if I asked for your advice?

You need to attach the event first using the actions from the workflow. Did you do that?

I did yep, which event is it that gets used for the Street view?
I can see these options:

I probably don’t have that
Whats the event called?

I think it’s called “visible_changed” and has true or false as a value

Just a sec

I did a quick add to the event but unfortunately these events related to pano views are easily incorporated in the code i have as they were not taken into account when I made the event listeners.

It would require some code changes.

I see a function I can use but again its not easily incorporated with my existing framework

var map = new google.maps.Map(document.getElementById("theMap"), {streetViewControl: true});

var thePanorama = map.getStreetView();

google.maps.event.addListener(thePanorama, 'visible_changed', function() {

    if (thePanorama.getVisible()) {

        // Display your street view visible UI

    } else {

        // Display your original UI



Ok understood, I take it there wouldn’t be a way I could use that piece of code inside a ‘Run javascript’ action to get the desired value would there? or is the only way to modify the plugin?

It would have been a nice to have option really for me as I have a couple of elements which appear on my screen on top of the map but I was hoping to hide them when the street view map was visible but not a problem if it can’t be done easily.

Ok, to answer my last question… nope that doesn’t work!

Whilst I’m playing around with things Ali, another idea that would probably benefit not just myself but all the others using this too, would be to add a “Hide Layers a Maps Extended” element action.

It would essentially be the same code as what you have for the “Show Layers a Maps Extended” action but instead of passing the ‘map’ object when calling setMap(), you can give it a null value to clear the specified layer, like in this example with ‘TransitLayer’.

var map = new google.maps.Map(document.getElementById(“map”), mapOptions);

var transitLayer = new google.maps.TransitLayer();

var map = new google.maps.Map(document.getElementById(“map”), mapOptions);

var transitLayer = new google.maps.TransitLayer();

Hoping that’s correct anyway!
It’s a great plugin by the way :slight_smile: