Select to view content in your preferred language

Google Street View Widget for the Flexviewer

7825
82
01-11-2011 02:25 AM
andrewj_ca
Occasional Contributor II
I wanted to get some feedback on my street view widget for the Flexviewer 2.*, Check it out here:

http://www.arcgis.com/home/item.html?id=f069d8a3aa304e29a432b48e5f64ca74
Tags (2)
0 Kudos
82 Replies
SteveNelson
Occasional Contributor II
Just tagging onto this thread to confirm I'm having the same issue with the compiled version.
If there's anything I can do/test to help out just let me know.

I had an issue with a previous verson of this streetview tool where it conflicted with other widgets that were included in my project - so I'm going to remove all other widgets just to see if this makes any difference.
Cheers
Steve

*EDIT - just noticed someone already tried removing all other widgets..
0 Kudos
deleted-user-yA_w_FC9FKe5
New Contributor III
I think it has to do with index.swf file.  What does this file do?  It seems as if when I replace the index.html file and the index.swf file on a simple flex project or new project things work fine.  However, one where I have a complex project that has already been started if I overwrite that index.swf file it won't work at all 😞  Any thoughts on this???
0 Kudos
GeorgeHaskett
Occasional Contributor III
Andrew,

Have you thought about adding the Google Earth viewer into this widget so that you can see the terrain data in quasy 3D?

Would that be possible or is that asking too much of a Flex Viewer Widget?

Something similar to this:

http://mcpd.mt.gov/mcpd/Home/threeD?lat=47.1121960589818&lng=-110.264282226563&description=9100200

Thanks,

Haskett
0 Kudos
MarcinDruzgala
Occasional Contributor
Hi, I've got a question. Isn't that illegal to use google maps or google street view in flex application? I'm reffering to this thread:
http://forums.arcgis.com/threads/51953-Google-Maps-in-Flex-Viewer

Two reasons i'm asking:
-using this widget
-using google maps with Javascript function in my Flex application(i posted a thread but noone answered http://forums.arcgis.com/threads/68033-Google-Maps-in-Viewer-for-Flex-amp-amp-Multiple-WMS-layers )

MDruzgala
0 Kudos
GeorgeHaskett
Occasional Contributor III
MDruzgala,

I'm not a lawyer so my input is simply my basic understanding, so if I am wrong feel free to post.

This has always seemed a question that in some aspects is simple to explain while yet in other aspects it may not be.

My understanding is that te biggest issue is how the data is being pulled in and utilized.  It is illegal to hack Google map tiles and import them into your application directly as a service, unless you have permissions to do so via whatever license it takes.  I remember a few years ago you could purchase a Google image server and install it as part of your overall GIS server solution, thus allowing you to use their data inside your application.  I don't know if this is offered anymore or not.  Likewise, Arc2Earth use to offer an application for a fee that did the same within ArcGIS Desktop software.  Again, I don't know if its currently available either.

The application or widget in question on this thread does not pull the data into the Flex Viewer as a service, but instead pulls it into a separate shell with the appropriate logos and terms of use, etc.

Having said that, I'm not a lawyer and its typically safer to default to not using their data if you have any doubts.  There appears to be multiple threads regarding this, but everyone seems to make a statement without adding additional supporting explaination, etc.

Again this is only my understanding and could be totally wrong....
0 Kudos
MarcinDruzgala
Occasional Contributor
Geohaskett,

Thanks for answering. Still i dont understand why this is illegal since i use a Javascript API to run google maps, which is legall. But hey, this is Google. Honestly it's a shame that if u want to create a website with google map as a basemap you can do it only with Javascript...

Regards,
MDruzgala
0 Kudos
TonyBlades
New Contributor
I think it has to do with index.swf file.  What does this file do?  It seems as if when I replace the index.html file and the index.swf file on a simple flex project or new project things work fine.  However, one where I have a complex project that has already been started if I overwrite that index.swf file it won't work at all 😞  Any thoughts on this???


We got it working.  Try this:
0 Kudos
PeterMatst
New Contributor
0 Kudos
BenDrury
Occasional Contributor
I was having the same problem.  Inserted the items in bold below and now mine works.

Good Luck!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>ArcGIS Viewer for Flex</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="description" content="Esri ArcGIS viewer for Flex"/>
        <meta name="keywords" content="Esri, ArcGIS, Flex Viewer"/>
        <meta name="author" content="Esri"/>

        <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
             the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
             the percentage of the height of its parent container, which has to be set explicitly.  Fix for
             Firefox 3.6 focus border issues.  Initially, don't display flashContent div so it won't show
             if JavaScript disabled.
        -->
        <style type="text/css" media="screen">
            html, body  { height:100%; }
            body { margin:0; padding:0; overflow:auto; text-align:center;
                   background-color: #ffffff; }
            object:focus { outline:none; }
            #flashContent { display:none; }
        </style>

        <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
        <!-- BEGIN Browser History required section >
        <link rel="stylesheet" type="text/css" href="history/history.css" />
        <script type="text/javascript" src="history/history.js"></script>
        <! END Browser History required section -->

        <script type="text/javascript">
            var isIElt9 = false;
        </script>
        <!--[if lt IE 9]>
            <script type="text/javascript">
                isIElt9 = true;
            </script>
        <![endif]-->

        <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
        <script type="text/javascript" src="widgets/StreetView/streetview.js"></script>

        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
            <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
            var swfVersionStr = "11.1.0";
            <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
            var xiSwfUrlStr = "playerProductInstall.swf";
            var flashvars = {};
            flashvars.localeChain = "en_US";
            flashvars.resourceModuleURLs = "assets/locale/en_US.swf";
  
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            var isAIR = navigator.userAgent.indexOf("AdobeAIR") != -1;
            if (isAIR || isIElt9)
            {
                // workaround for overlaying tool tips and other content when loaded into an AIR app
                // workaround for cursor issue - https://bugs.adobe.com/jira/browse/SDK-26818
                params.wmode = "opaque";
            }
            var attributes = {};
            attributes.id = "agsview3";
            attributes.name = "agsview3";
            attributes.align = "middle";
            swfobject.embedSWF(
                "index.swf", "flashContent",
                "100%", "100%",
                swfVersionStr, xiSwfUrlStr,
                flashvars, params, attributes);
            <!-- 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;");
        </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.
        -->
        <div id="flashContent">
            <p>
                To view this page ensure that Adobe Flash Player version
                11.1.0 or greater is installed.
            </p>
            <script type="text/javascript">
                var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
                document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
                                + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
            </script>
        </div>

        <noscript>
            <object id="agsview3" name="agsview3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="index">
                <param name="movie" value="index.swf" />
                <param name="quality" value="high" />
                <param name="bgcolor" value="#ffffff" />
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="true" />
                <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="index.swf" width="100%" height="100%">
                    <param name="quality" value="high" />
                    <param name="bgcolor" value="#ffffff" />
                    <param name="allowScriptAccess" value="sameDomain" />
                    <param name="allowFullScreen" value="true" />
                <!--<![endif]-->
                <!--[if gte IE 6]>-->
                    <p>
                        Either scripts and active content are not permitted to run or Adobe Flash Player version
                        11.1.0 or greater is not installed.
                    </p>
                <!--<![endif]-->
                    <a href="http://www.adobe.com/go/getflashplayer">
                        <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
                    </a>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>
        </noscript>
   </body>
</html>
0 Kudos
LefterisKoumis
Regular Contributor II
I downloaded the uncompiled version of the streetview and run it. It works in Google Chrome but not in Firefox 16.0.1 or IE 8. Haven't tried in IE9.

All other suggested modifications from users in this forum did not work.

It seems that the coding for browser compartibility needs to be revised.
0 Kudos