Select to view content in your preferred language

Google® Street View Widget

47291
153
06-12-2013 08:02 PM
RobertScheitlin__GISP
MVP Emeritus

All,

   Here is the next installment to my long list of widgets. I never really wanted to add to the list of several Street View Widgets, but as it's predecessors have lacked updating when new version of Flex Viewer are released and me wanting to add more features, I finally decided to do one myself.

The Google Street View Widget version 3.3 for Flex Viewer 3.3 allows you to view Google Street View Panoramas in a popup window. The widget use Google Maps API Version 3 and has almost all the API options for the Street View Panorama that are available in the API configurable in the widgets xml. A lot of attention has gone into the UI (User Inferface) and UX (User Experience) of this widget and a lot of cross browser testing has been done. Tested on Safari for windows 5.1.7, Internet Explorer 9, Opera 12.15, FireFox 21.0, and Chrome 27.0.1453.110 m.

Configurable features include:

    * hidestreetviewvwidowwhenminimized - This is a true or false value and determines if the graphic on the map and the Google Street View window are hidden when the widget is minimized.
    * width - The width of the popup widow that is opened.
    * height - The height of the popup widow that is opened.
    * apikey - The Google Maps API Key that you must obtain to use this widget.
      https://developers.google.com/maps/documentation/javascript/tutorial#api_key
    * addresscontrol - is a true or false value and determines if the Google Street View Address Control is visible.
      It has an attribute of controlposition that defines where in the popup window the control is placed.
    * clicktogo - is a true or false value and determines if the Google Street View will move to the location clicked.
    * disabledoubleclickzoom - is a true or false value and determines if the Google Street View will zoom into the
      location on the panorama where the user double clicks.
    * imagedatecontrol - is a true or false value and determines if the Google Street View will display the date of the
      panorama image was taken along the bottom of the window with the copyright info.
    * linkscontrol - is a true or false value and determines if the Google Street View will display the movement arrows
      and street names on the panorama for navigation purposes.
    * pancontrol - is a true or false value and determines if the Google Street View pan Control is visible.
      It has an attribute of controlposition that defines where in the popup window the control is placed.
    * zoomcontrol - is a true or false value and determines if the Google Street View zoom Control is visible.
      It has an attribute of controlposition that defines where in the popup window the control is placed and a
      controlstyle attribute that determines the size of the control.
   
    * All text that the widget uses is configurable in the xml to allow for internationalization of the widget.

So here it is: http://www.arcgis.com/home/item.html?id=b4259b1cf73e4fa3b04e7bdf75fee29b

Tags (2)
0 Kudos
153 Replies
AaronKreag
Occasional Contributor
I have been having issues with this widget, on and off, it worked for a few days great and then stopped working.  I kept getting that error that "Google has disabled the application...".  I got a couple different errors as well.  I have struggled with this.  Initially I thought Google shut me down, I thought maybe my mobile phone integration with the core web map messed it up.  I thought maybe it was browsers, my network, popup blockers, antivirus, etc etc.  I think I have spent 30 hours looking at this.

In the end.... what I came up with is, if you build a fresh Flex web map with the 3.6 Viewer for Flex, add the Google Street View widget, configure and save.  It works.  Having the initial screen pop up that an image isn't available while covering the actual widget is a bit confusing but it works as expected.

Adding this streetview widget by just editing the widgets folder and configs to a previous version web map, even after it has been "upgraded" with the Viewer for Flex, creates all kinds of errors for me.

I dug through file after file and the only difference between the brand new, fresh 3.6 Viewer for Flex created web map and an "upgraded" Viewer for Flex application, is that the new freshly created version contains a bit more text in the main Index.html file.  The text in the new one that works is between the commented text (commented text in both versions for reference):

            // JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
            swfobject.createCSS("#flashContent", "display:block;text-align:left;");
            if (swfobject.ua.ie && swfobject.ua.win)
            {
                swfobject.addLoadEvent(
                    function()
                    {
                        var app = swfobject.getObjectById("index");
                        if (app)
                        {
                            app.focus();
                        }
                    }
                );
            }
        </script>
    </head>
    <body>
        <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
             JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
             when JavaScript is disabled.

The Index.html of a web mapping application that works, but in which the Google Streetview widget does not work correctly, lacks this little bit of text.  There may be some differences in the Index.swf but I am not able to look at those....

So as things stand now, I have Flex web mapping applications that are working and have the Google Streetview widget added.  The ones that do not work have some missing Index.html that is a carry over from the previous version(s) of the Viewer for Flex.

Hopefully this little clue will help solve some issues.  Thank you.

Aaron
0 Kudos
TimConfare
New Contributor III
Fantastic widget Robert!  Thank you.  This works very well on our county site but I've noticed that it doesn't work in IE 11.  I've tested other browsers and versions and they all appear to work great.  Is there anything I can do to make it work in version 11? Or will there be an update to the widget to accomodate 11?  Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   I can happily confirm that the widget does work fine on IE 11.

[ATTACH=CONFIG]33342[/ATTACH]

So you are going to want to look at the posts I have made a specific configuration that has to be done for IE in general (post 80 and 82 in this thread).
0 Kudos
TimConfare
New Contributor III
Tim,

   I can happily confirm that the widget does work fine on IE 11.

[ATTACH=CONFIG]33342[/ATTACH]

So you are going to want to look at the posts I have made a specific configuration that has to be done for IE in general (post 80 and 82 in this thread).


Thanks for the quick reply.  I'm a little confused.  I went back to post 80 and 82 and it appears those fixes were for users trying the widget in an intranet.  The couple users I have who are having problems with this widget are not connecting via intranet.  I did have a co-worker try this in IE 11 and it did work for him so apparantly something else is wrong.  The error they are getting is �??Unable to get property �??closed�?? of undefined or null reference.�?�  It happense after they try placing the "google man" on a road.  The widget is working for the majority of our users but there are 4 or 5 who happen to get this same error message and all of them are using IE 11.

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tim,

   OK that sounds like they are just having the usual popup blocker issue then. Check thier computers for a popup blocker that came with a toolbar or some other software they have installed.
0 Kudos
orenmalka
New Contributor
Hi Robert,

Thanks for the widget, it works great.
I have a question, how can I place the panorama window at the bottom of the site.
Attached  an example

[ATTACH=CONFIG]33637[/ATTACH]
Thanks,
Oren
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Oren,

   You cannot do that with my widget. The example is of another street view widget and not mine (it's last update was for 3.0 of the viewer though).

http://www.arcgis.com/home/item.html?id=b721eec8dde442559e9c17acecd22188
0 Kudos
RhettZufelt
MVP Notable Contributor
Hi Robert et al.,

The streetview widget produces fisheye views of the streets in IE (versions 9 & 10)  -- the streets look curvey when they're actually straight; however, it is working fine in Chrome.  Are you aware of such issue and what is the recommended solution? 


Many thanks,

Thanh



Did anyone ever figure out where this is coming from?

Just added this to my compiled version FV3.6 and am getting the "fisheye" images.  Using IE 10.0.12 and Firefox 30.0 and get the same thing with both browsers...  On windoze 7 box.

Only thing edited is the API key.  Generated a new key and pasted it into the xml config.

Thanks for any insight,

R_
0 Kudos
MichaelMiller2
Regular Contributor
Anyone having issues with Street View not displaying any images? It was working the other day just fine and I happened to check it today on a few of my apps and it allows you to place icon, but no image in window. No configurations have changed and I have confirmed that api key is valid. Strange....
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michael,

   I just tested in IE11, FireFox 30, and Chrome 35 and all functioned fine.
0 Kudos