Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 27th, 2006, 11:53 PM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Earth with TBH???

I have tried to add a Virtual Earth Map into a new page. I integrated the Virtual Earth JavaScript into the template.Master Head as follows:

<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
    <title>Custom Residency</title>
    <script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/v3/mapcontrol.js"> /* <![CDATA[ */
        function AdjustColumnsHeight()
        {
            // get a reference to the three DIVS that make up the columns
            var centerCol = window.document.getElementById('centercol');
            var leftCol = window.document.getElementById('leftcol');
            var rightCol = window.document.getElementById('rightcol');
            // calculate the max height
            var hCenterCol = centerCol.offsetHeight;
            var hLeftCol = leftCol.offsetHeight;
            var hRightCol = rightCol.offsetHeight;
            var maxHeight = Math.max(hCenterCol, Math.max(hLeftCol, hRightCol));
            // set the height of all 3 DIVS to the max height
            centerCol.style.height = maxHeight + 'px';
            leftCol.style.height = maxHeight + 'px';
            rightCol.style.height = maxHeight + 'px';
            // Show the footer
            window.document.getElementById('footer').style.vis ibility = 'inherit';
        }
        window.onload = function() { AdjustColumnsHeight(); }
    /* ]]> */
    </script>
</head>


Unfortunately, the css causes the interavtive pop up menu on the virtual earth map to move 200px to the right of the pushpin because the template.Master codes <div id="centercol">

The below code out of the css file

#centercol
{
   position: relative;
   margin-left: 200px;
   padding: 0px;
   background-color: white;
}


If I set the margin-left to 0px the virtual earth menu aligns with the pushpin, but I loose the left column altogether.

Can anyone help????

 
Old November 28th, 2006, 02:22 AM
Authorized User
 
Join Date: May 2006
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default

How about another DIV?

 
Old November 28th, 2006, 07:17 AM
Registered User
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you say a little bit more about adding another DIV? I tried inserting another DIV before, after, and replacing the "centercol", but it didn't work. If you put this code into the a Map.aspx file that inherits from a template above, you will see what I mean.

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server">

<body onload="GetMap();">

         <script>
      var map = null;

      function GetMap()
      {
      {
         map = new VEMap('myMap');
         map.LoadMap();

      }

      var pin = new VEPushpin(1,
          new VELatLong(38.93048,-120.002),
          null,
          'Daves Pub'
        );
       map.AddPushpin(pin);

       }

      </script>
      <div id='myMap' style="position:relative; width:800px; height:550px;"></div>

   </body>

</asp:Content>

 
Old November 28th, 2006, 01:38 PM
Authorized User
 
Join Date: May 2006
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default

Now I have the full picture. The centerCol style is set relative to the position of container2. This was done to put the centerCol to the right of leftCol. So repositioning the centerCol is not going to work for you.

What's probably happening is that the pop-up menu is relatively positioned on centerCol too, but is being placed behind the right column instead of on top. You might be able to set the z-index of the myMap div moving the menu to the top of the stack.






Similar Threads
Thread Thread Starter Forum Replies Last Post
AJAX + TBH? ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 13 December 11th, 2007 09:17 AM
Help! Still cannot get the TBH to run sarka BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 August 12th, 2007 12:21 AM
AJAX-TBH FT BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 17 August 6th, 2007 04:11 AM
TBH erros prbspfc BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 7th, 2007 01:32 PM
TBH and XML rocco50 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 January 31st, 2007 11:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.