4 Replies Latest reply on Jan 24, 2008 2:43 PM by sergeysmirnov

    VE mapstyle not displayed

    hispeedsurfer

      Hi,

      when I use richfaces-3.1.3 the mapstyle-label of Virtual Earth is not displayed(have a look in demo).

      I don't no why, but the innerHTML of the div has been removed.

      To put the label manually I can use this

      var road = document.getElementById("MSVE_navAction_RoadMapStyle");
      road.innerHTML = "Road"

      ... but this is not the real solution

        • 1. Re: VE mapstyle not displayed
          hispeedsurfer

          Oh, there is more than that.

          It seems there is a crash in javascript between something in richfaces and virtual earth. But that's only the case in firefox, in IE i don't have this 'feature' ;)

          I have custom info boxes to display map informations, these infos cannot be displayed as well.

          I switched from 3.1.2 to 3.1.3 to use the rich:listShuttle component. I hope the is a solution to use both side-by-side.

          • 2. Re: VE mapstyle not displayed
            hispeedsurfer

            Hi,

            have nobody get out why there is a problem with richfaces-3.1.3 and virtual-earth?

            If you have a look in the upper left corner of the map in richfaces-virtualEarth example there is no label for 'road', 'aerial' and 'hybrid'. Also there are some problems when using VE's info boxes.


            Thanks

            • 3. Re: VE mapstyle not displayed
              nbelaevski

              Andreas,

              I've filed issue to JIRA on that: http://jira.jboss.com/jira/browse/RF-2035

              • 4. Re: VE mapstyle not displayed

                The investigation shows that prototype.js is guilty.

                This is very short code that demonstrates the conflict. If you remove the link to Prototype, the labels appear.

                <html>
                <head>
                 <title>Prototype.js vs. Virtual Earth</title>
                <script src="http://www.prototypejs.org/assets/2007/11/6/prototype.js"></script>
                </head>
                
                <body>
                
                <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6">
                </script>
                <div id='myMap' style="width:400px; height:400px;"></div>
                <script>
                var map = new VEMap('myMap');
                map.LoadMap();
                </script>
                </body>
                </html>


                However, it is not clear how to avoid it. The prototype.js is widely used in RichFaces. Including the initial code for the VE itself. The problem started after we upgrade prototype from 1.5.1.1 toward 1.6 in the version 3.1.3