 |
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
|
|
|
|
|

May 1st, 2009, 01:25 PM
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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..
|
|

May 3rd, 2009, 11:58 AM
|
|
Registered User
|
|
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

May 28th, 2009, 05:10 PM
|
|
Authorized User
|
|
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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?
|
|

June 10th, 2009, 06:43 AM
|
|
Authorized User
|
|
Join Date: Jun 2009
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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:
|
|
|

June 10th, 2009, 05:58 PM
|
|
Authorized User
|
|
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
Thank you very much that resolved the problem.
|
|

June 25th, 2009, 04:27 PM
|
|
Registered User
|
|
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

June 25th, 2009, 04:36 PM
|
|
Authorized User
|
|
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
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.
|
|

June 25th, 2009, 04:50 PM
|
|
Registered User
|
|
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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;
}
|
|

June 25th, 2009, 05:11 PM
|
|
Authorized User
|
|
Join Date: Apr 2009
Posts: 16
Thanks: 2
Thanked 0 Times in 0 Posts
|
|
theMap is the one that I had to set. It seems that you might have a different issue than I did. Sorry.
|
|

June 25th, 2009, 06:22 PM
|
|
Authorized User
|
|
Join Date: Jun 2009
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
|
|
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
, but it should be
.
Also, can you post the contents of your Map.ascx?
Good luck!
S.
|
|
 |