<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Component Discussions</title><link>http://forums.asp.net/69.aspx</link><description>Discuss your favorite ASP.NET components here. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=70&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Google Maps not working</title><link>http://forums.asp.net/thread/3522099.aspx</link><pubDate>Thu, 19 Nov 2009 14:34:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3522099</guid><dc:creator>andresossa</dc:creator><author>andresossa</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3522099.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=69&amp;PostID=3522099</wfw:commentRss><description>&lt;p&gt;
Hi I have a problem with google maps as well and I have tried everything to solve it. Please help me. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;the maps are loaded perfectly if the page&amp;nbsp; is the index of a controller. But if the page has parameters on the route or if it isn&amp;#39;t the index of the controller, then the map doesn&amp;#39;t loads. &lt;/p&gt;&lt;p&gt;For example,I have the following action for a view. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;public ActionResult Mapa(int id)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Jefe&amp;gt; jefes = repositorio.GetJefesPorEvento(id);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Vendedor&amp;gt; vendedores = new List&amp;lt;Vendedor&amp;gt;();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (jefes.Count &amp;gt; 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vendedores.AddRange(repositorio.GetVendedoresPorEvento(jefes[0]));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return View(&amp;quot;Mapa&amp;quot;, vendedores);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;This doesn&amp;#39;t work..&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;but if I change it to this:&lt;/p&gt;&lt;p&gt;public ActionResult Index()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Jefe&amp;gt; jefes = repositorio.GetJefesPorEvento(7); //it can be any number of a certain event (party, dinner, etc). &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;Vendedor&amp;gt; vendedores = new List&amp;lt;Vendedor&amp;gt;();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (jefes.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vendedores.AddRange(repositorio.GetVendedoresPorEvento(jefes[0]));&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return View(&amp;quot;Index&amp;quot;, vendedores);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;(the views are exaclty the same of course, so the problem shouldn&amp;#39;t be there.)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;then it works. &lt;/p&gt;&lt;p&gt;Please help me if you can!&lt;/p&gt;&lt;p&gt;Thanks!&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Google Maps not working</title><link>http://forums.asp.net/thread/3313474.aspx</link><pubDate>Sun, 26 Jul 2009 19:47:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3313474</guid><dc:creator>tmargot</dc:creator><author>tmargot</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3313474.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=69&amp;PostID=3313474</wfw:commentRss><description>&lt;p&gt;After looking at many solution on registering google&amp;#39;s javascript with ASP.NET I cheated and put the map into a standard HTML file and placed an iFrame on the asp.net page with the map.html file loaded into it. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Google Maps not working</title><link>http://forums.asp.net/thread/3266010.aspx</link><pubDate>Tue, 30 Jun 2009 08:50:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3266010</guid><dc:creator>tmargot</dc:creator><author>tmargot</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3266010.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=69&amp;PostID=3266010</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;mohd786hussain:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nothing wrong with the code just put :&lt;/p&gt;
&lt;p&gt;&amp;lt;div id=&amp;quot;map_canvas&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt; and the map will come nicely and you can smile. &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks very much for the reply. I still have the problem even after placing the div (I had multiple versions for testing and forgot the div on that specific test.&lt;/p&gt;
&lt;p&gt;I found my problem lies in the doctype, if I remove it, everything works fine. I have tried different doctypes but still have the same problem.&lt;/p&gt;</description></item><item><title>Re: Google Maps not working</title><link>http://forums.asp.net/thread/3265777.aspx</link><pubDate>Tue, 30 Jun 2009 06:53:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3265777</guid><dc:creator>mohd786hussain</dc:creator><author>mohd786hussain</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3265777.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=69&amp;PostID=3265777</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;nothing wrong with the code just put :&lt;/p&gt;&lt;p&gt;&amp;lt;div id=&amp;quot;map_canvas&amp;quot; style=&amp;quot;width: 300px; height: 300px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt; and the map will come nicely and you can smile. &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Google Maps not working</title><link>http://forums.asp.net/thread/3264371.aspx</link><pubDate>Mon, 29 Jun 2009 13:57:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3264371</guid><dc:creator>tmargot</dc:creator><author>tmargot</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3264371.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=69&amp;PostID=3264371</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Google maps is not working and for the life of me cannot figure out why. It works in a straight&amp;nbsp;HTML file. At first I thought it may be the ASP.NET Menu Control&amp;nbsp;conflicting, but&amp;nbsp;now I have created this&amp;nbsp;basic file and it still does not work.&amp;nbsp;I call the Google Map code from the body onload, but then decided for testing to do it simple as below. Could someone please help?&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeBehind=&amp;quot;map_no_master.aspx.cs&amp;quot; Inherits=&amp;quot;AccountsRapport.map_no_master&amp;quot; %&amp;gt;

&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;

&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot; &amp;gt;
&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;div&amp;gt;
    &amp;lt;div id=&amp;quot;map_canvas&amp;quot; style=&amp;quot;width: 300; height: 300;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://maps.google.com/maps/api/js?sensor=false&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
  	var myLatlng = new google.maps.LatLng(51.372149, -0.457936);
  	var myOptions = {
  		zoom: 15,
  		center: myLatlng,
  		mapTypeId: google.maps.MapTypeId.ROADMAP
  	}
  	var map = new google.maps.Map(document.getElementById(&amp;#39;map_canvas&amp;#39;), myOptions);


  	var marker = new google.maps.Marker({
  		position: myLatlng,
  		map: map,
  		title: &amp;#39;Accounts Rapport&amp;#39;
  	});   
&amp;lt;/script&amp;gt;

    &amp;lt;/div&amp;gt;
    &amp;lt;/form&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>