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 June 26th, 2009, 07:57 AM
Registered User
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Earth Map Does Not Display Properly

Hi calculemus,
I checked for "<divid" and that was an error on my post here. Sorry about that.

Here is my Map.ascx. I notice that pasting "div id" converts it to "divid" again. Thanks again for your help.
<%@ControlLanguage="C#"Inherits="System.Web.Mvc.ViewUserControl<NerdDinner.Models .Dinner>" %>
<scriptsrc="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"
type="text/javascript"></script>
<
scriptsrc="/Scripts/Map.js"type="text/javascript"></script>
<
div id="theMap"style="width:520x">
</
div>

<
scripttype="text/javascript">
$(document).ready(function() {
var latitude = <%=Model.Latitude %>;
var longitude = <%=Model.Longitude %>;
if ((latitude == 0) || (longitude == 0))
LoadMap();
else
LoadMap(latitude, longitude, mapLoaded);
});
function mapLoaded() {
var title = "<%= Html.Encode(Model.Title) %>";
var address = "<%= Html.Encode(Model.Address) %>";
LoadPin(center, title, address);
map.SetZoomLevel(14);
}
</script>
 
Old June 26th, 2009, 08:48 AM
Registered User
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Earth Map Does Not Display Properly

Please don't put any more time into this. Something very weird is going on.

I thought I would use brute force to debug this thing, so I backed up my broken app and copied all the .aspx files from the download version of Views/Dinners/ into my version. Presto! it works fine.

Here is where it gets weird. I replaced the Dinners files with my old (supposedly broken) versions. It still works.

I performed the file copying etc with VS shut down.

I swear I didn't touch any other files.

I always do re-builds of the app.

I always re-start the development web server between code changes.

Any ideas?

This is a pretty scary scenario. In a real world situation, I would not have a working copy of the software to somehow "reset" the IDE.

Thank you for all of your help.
 
Old June 26th, 2009, 09:22 AM
Authorized User
 
Join Date: Jun 2009
Posts: 20
Thanks: 0
Thanked 1 Time in 1 Post
Default Hmm... interesting....

Hi taddendum,
I would do a simple diff (tortoise SVN is handy) to see if your aspx files are somehow different from the downloaded ones.

If they are somewhat the same, I suspect that it might be somehow related to your browser caching old CSS files. I highly doubt this though because you say that you're restarting your dev server after code changes.

I guess what's important is that the problem's resolved. Have fun reading rest of the book.

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.