Wrox Programmer Forums
|
BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9
This is the forum to discuss the Wrox book Professional ASP.NET MVC 1.0 by Rob Conery, Scott Hanselman, Phil Haack, Scott Guthrie; ISBN: 978-0-470-38461-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 1.0 ISBN: 978-0-470-38461-9 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 May 1st, 2009, 01:25 PM
Registered User
 
Join Date: Feb 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Earth Map Does Not Display Properly

I'm on page 132 (print edition) of the book, and my Virtual Earth map does not display correctly. A Beige box ends up below the Create.aspx form, the VE logo sticks to the left lower browser corner, the scale bar to the lower right browser corner, and the map itself is stuck to the upper left corner of the browser.

I even tried to copy and past the code directly from the code download, and it still does the same thing.

I've tried numerous things, including substituting jQuery 1.2.6, since that is what is used in the code download, but no luck. When I run the code download, it works fine, of course. So, I have no idea what is going on. Anyone else have trouble displaying the Virtual Earth map?

Last edited by adimauro; May 1st, 2009 at 02:21 PM..
 
Old May 3rd, 2009, 11:58 AM
Registered User
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi adimauro,

This happened to me too. The reason it looks like this is the Site.css that gets created by when you start MVC project was never edited in the chapter.

What I did to fix this was to download the source code available online and add the missing lines from the given source code into my Site.css

Hope this helps
 
Old May 28th, 2009, 05:10 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I am having this same problem. I added the css to make the dinner div float left and the vemap float right. The boxes are in the correct places, but the VE map hovers over everything in the left corner. Did anyone resolve the problem?
 
Old June 10th, 2009, 06:43 AM
Authorized User
 
Join Date: Jun 2009
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Site.css

As jonv mentioned, downloading the source code from the book's website and copying over Site.css got the map working for me.

Thing to note is that the <div> tag which you assign your VEMap to should have position:relative style otherwise your VE tiles (which have position:absolute) will try to position themselves relative to the page.


Hope this helps.

S.
The Following User Says Thank You to sakshamgautam For This Useful Post:
zondre (June 10th, 2009)
 
Old June 10th, 2009, 05:58 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thank you very much that resolved the problem.
 
Old June 25th, 2009, 04:27 PM
Registered User
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Still a problem with map floating to upper left

Hello,
I copied the site.css from the downloaded solution (which works fine) to my content folder. The problem still exists. Any ideas? When overwriting the original didn't work I tried cutting and pasting from the download to the original. Still no good. I really,. really don't want to have to do a file by file compare with the download version but I'm stumped.
 
Old June 25th, 2009, 04:36 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Did you double check that there is a css property for the div tag that you have on your page where the VE map is supposed to sit? Make sure the position is set to relative as pointed out above. That solved my problem. I thought I was setting all of the css properties but that one wasn't in the download.
 
Old June 25th, 2009, 04:50 PM
Registered User
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Still a problem with map floating to upper left

Hi zondre. First of all, thank you for your prompt response. I thought I'd have to wait until tomorrow.

Maybe I'm misunderstanding your suggestion. The div tag I believe I'm mapping to is in Map.ascx: <div id="theMap"></div>

the Site.css property for this is:

#theMap
{
position: relative;
width: 500px;
height: 450px;
}

Is this correct or is it this one?
<divid="mapDiv">
<% Html.RenderPartial("Map", Model.Dinner); %>
</div>

Site property:
#mapDiv {
float: left;
}
 
Old June 25th, 2009, 05:11 PM
Authorized User
 
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
Default

theMap is the one that I had to set. It seems that you might have a different issue than I did. Sorry.
 
Old June 25th, 2009, 06:22 PM
Authorized User
 
Join Date: Jun 2009
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Error in HTML

Hi taddendum,
Could it be that you need a small space in between your div and id?

From what you have posted, your div tag looks like
Code:
<divid="mapDiv">
, but it should be
Code:
<div id="mapDiv">
.

Also, can you post the contents of your Map.ascx?

Good luck!

S.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Earth with TBH??? BradenBR BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 November 28th, 2006 01:38 PM
display hierarchical site map using repeaters wlin ASP.NET 2.0 Basics 1 August 31st, 2006 11:18 AM
display hierarical site map using repeaters wlin ASP.NET 1.0 and 1.1 Basics 0 August 24th, 2006 12:35 PM
Ch05 IE not properly display XML david_4092 BOOK: Beginning ASP.NET 1.0 1 October 24th, 2003 01:23 PM





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