Select to view content in your preferred language

Google® Street View Widget

48320
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
OusmaneBarry
New Contributor
Hi,

Amazing job! It works on Flex Viewer 3.1 with API for Flex 3.2. I didn't change anything, just added my Google API Key.
0 Kudos
GeorgeHaskett
Deactivated User
Robert,

I just installed the Viewer for Flex 3.4 prior to realizing that you haven't been able to upload the new 3.4 versions of this widget.  Therefore I don't know if I'm having troubles with conflicts between the different versions or I'm simply not doing something correctly.

I have created an API key and entered it into my xml file, part of the compiled version.  When I go to initiate the widget I get the following error:

[INDENT]Message from webpage[/INDENT]
[INDENT][INDENT]initialize: Invalid property value.[/INDENT][/INDENT]

Does this ring a bell for you at all?

My code for the xml file is as below, my API key has been truncated, etc:

<configuration>
  <hidestreetviewvwidowwhenminimized>true</hidestreetviewvwidowwhenminimized>
  <width>500</width>
  <height>600</height>
  <apikey>A......U</apikey>
  <streetviewpanoramaoptions>
    <addresscontrol controlposition="TOP_CENTER">true</addresscontrol>
    <clicktogo>false</clicktogo>
    <disabledoubleclickzoom>true</disabledoubleclickzoom>
    <imagedatecontrol>false</imagedatecontrol>
    <linkscontrol>true</linkscontrol>
    <pancontrol controlposition="TOP_LEFT">true</pancontrol>
    <zoomcontrol controlposition="TOP_LEFT" controlstyle="SMALL">false</zoomcontrol>
  </streetviewpanoramaoptions>
  <labels>
    <clearlabel>Clear</clearlabel>
    <status>Show Google Street View</status>
    <nostreetviewimageavailablemsg>No Street View Image Available&lt;br /&gt;or you have not yet dragged the Google® Street View man&lt;br /&gt;onto the map to set your location.</nostreetviewimageavailablemsg>
    <instructions>Drag the Google® Street View man onto the street you want to see a panorama for. You can also drag the street view man around on the map once he has been placed.</instructions>
    <operamsg>Because you are using Opera as your web browser you may need to perform the following steps</operamsg>
    <operamsgtitle>Opera Browser Detected</operamsgtitle>
    <popupblockermsg>This widget uses a popup window to show Google Street View panoramas. You need to enable popups in your browser.</popupblockermsg>
    <popupblockererrortitle>Popup Blocker Detected</popupblockererrortitle>
  </labels>
</configuration>

Thanks for any suggestions you can send my way.

Haskett
0 Kudos
PeterHoffman
Deactivated User
Robert,

I am using IE9 and getting the popup blocker detected even though I have it turned off.
What am I doing wrong?
0 Kudos
PeterHoffman
Deactivated User
I tried it in Firefox 22 and it works fine.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
George,

   That error is not ringing any bells... I will have to try and find time to test the 3.3 version in FV3.4 and see if I get the same.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Peter,

   Have you tried my URL: http://gis.calhouncounty.org/FlexViewer3.3/index.html?config=config-streetview.xml in IE9? I get it to work just fine. If you are trying to run it from your intranet then you have to do some work in IE to allow that. You have to uncheck "Display intranet sites in Compatability View". You find this by click your Alt key in IE to show the file menu. Then on the tools menu go to Compatibility View Settings.
0 Kudos
GeorgeHaskett
Deactivated User
No worries,

If its easier just let me know when you are able to upload the 3.4 versions.  I can wait til then.

Thanks,

**UPDATE**

After trying it out in Google Chrome I received a more indepth error message.  I went back to my Google account and played a bit with the Edit Allowed Referers setting and then everything seemed to work fine in Google Chrome, however I am still getting the same error message in IE9...

Thanks for you help.

Haskett
0 Kudos
JohnAllison
New Contributor
First off Thanks for a great widget. The only problem we seem to be having is with the employees with limited or no access. We opened up maps.google.com for them with no luck. Is there another URL that we need to add to allow them to look at the photos from Streetview?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
John,

   There some more to open:

https://maps.googleapis.com
https://maps.gstatic.com

There may be more that I am forgetting. You need to watch the http traffic and see what other urls are being accessed.
0 Kudos
MarkChambers1
Emerging Contributor
Widget installed easy and works great.  I may be missing something, but can I set the widget to start up minimized?

thank you,

Mark Chambers
0 Kudos