p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 27th, 2006, 11:53 PM
Registered User
 
Join Date: Nov 2006
Location: , , .
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????

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old November 28th, 2006, 02:22 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 99
Thanks: 0
Thanked 1 Time in 1 Post
Default

How about another DIV?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old November 28th, 2006, 07:17 AM
Registered User
 
Join Date: Nov 2006
Location: , , .
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>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old November 28th, 2006, 01:38 PM
Authorized User
 
Join Date: May 2006
Location: , , .
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

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 01: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 05: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



All times are GMT -4. The time now is 03:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc