Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Help With Google Map In Popup Window
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Bruce Acomb  
View profile  
 More options Mar 7 2006, 12:43 pm
From: "Bruce Acomb" <baac...@gmail.com>
Date: Tue, 07 Mar 2006 09:43:51 -0800
Local: Tues, Mar 7 2006 12:43 pm
Subject: Help With Google Map In Popup Window
Everyone,

I am trying to build a popup window using Google Maps, while not using
a preconfigured web page for the popup window (build the entire page
from scratch).  My popup window hangs whenever I add the line for the
API key, and does not finish loading the page.  I am sure that it's
something simple, but I am not a Java guru.  Any help on this would be
greatly appreciated.

Below is the code I am generating to build the popup window.  Thanks
again.

Bruce

FYI, my onLoad event would normally have all of the mapping API code,
but I need to get past this loading error first.

--------------------------------------------------------------------------- ---------------------

<script type="text/javascript">
<!--
        function createMapPopup()
        {
        var generator=window.open('',null,'left=500, top=100, height=475,
width=500, status=no, resizeable=no, scrollbars=no, toolbar=no,
location=no, menubar=no');
        generator.document.write('<%@ Page Language="C#"
AutoEventWireup="true" Title="Map Results"%>\n');
        generator.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> \n');
        generator.document.write('<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="urn:schemas-microsoft-com:vml">\n');
        generator.document.write('<head id="Head1">\n');
        generator.document.write('<meta http-equiv="content-type"
content="text/html; charset=UTF-8"/>\n');
        generator.document.write('<title>FedEx Maps Results Page</title>\n');
        generator.document.write('<style type="text/css"> v\\:* {
behavior:url(#default#VML); } </style>\n');
        generator.document.write('<script type="text/javascript"
src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAAWiXPqszmLva5aq2c...">\n');
        generator.document.write('</script >\n');
        generator.document.write('<script type="text/javascript" >\n');
        generator.document.write('function onLoad()\n');
        generator.document.write('{\n');
        generator.document.write('alert ("DUDE");\n');
        generator.document.write('}\n');
        generator.document.write('</script >\n');
        generator.document.write('</head>\n');
        generator.document.write('<body onload="onLoad()">\n');
        generator.document.write('<form id="myForm" runat="server"
action="onLoad()">\n');
        generator.document.write('<div id="map" style="WIDTH: 475px; HEIGHT:
450px"></div>\n');
        generator.document.write('</form>\n');
        generator.document.write('</body>\n');
        generator.document.write('</html>\n');
        generator.document.close();
        }
createMapPopup();
// -->
</script>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jacob  
View profile  
 More options Mar 7 2006, 12:53 pm
From: "Jacob" <ja...@reimers.dk>
Date: Tue, 07 Mar 2006 09:53:02 -0800
Local: Tues, Mar 7 2006 12:53 pm
Subject: Re: Help With Google Map In Popup Window
Just curious, why don't you just make it easy for yourself and open a
premade page?

In any case it would be better if you posted a link.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Barry Hunter  
View profile  
 More options Mar 7 2006, 1:34 pm
From: "Barry Hunter" <barrybhun...@googlemail.com>
Date: Tue, 7 Mar 2006 18:34:22 -0000
Local: Tues, Mar 7 2006 1:34 pm
Subject: Re: Help With Google Map In Popup Window
as already said why not have it as separate page, as the problem is almost
certainly that the javascript parser is seeing the script tags inside the
code and closing early. For example it probably sees the </script> and
actually stops executing and code and sees a line of code broken in the
middle.

A common way is to do something like:

generator.document.write('</scr'+'ipt >\n');

Barry
http://www.nearby.org.uk/google.html


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bruce Acomb  
View profile  
 More options Mar 7 2006, 2:04 pm
From: "Bruce Acomb" <baac...@gmail.com>
Date: Tue, 07 Mar 2006 11:04:57 -0800
Local: Tues, Mar 7 2006 2:04 pm
Subject: Re: Help With Google Map In Popup Window
Barry,

Thanks.  I tried that, and it did not help.

I have already done this is a premade page, and it works fine.  I am
trying to do it via a webservice, so that I can have several different
applications use it with litlle to no reuse of code, including a web
page.  Since I am doing this in a webservice, the syntax to pass back
to the parent web page has been fun to work with (passing back the
entire javascript in a stringbuilder variable to register on the parent
web page).

If I remove the API key line and just run the onLoad script, it works
fine.

I'm wondering if the google maps API does not know where to send the
map info (since it is an unnamed page).

Thanks again,

Bruce


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile  
 More options Mar 7 2006, 2:42 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Tue, 7 Mar 2006 19:42:54 +0000
Local: Tues, Mar 7 2006 2:42 pm
Subject: Re: Help With Google Map In Popup Window
One problem is that "<script" and "</script" are magic words inside
Javascript literal strings. I think the Javascript interpreter is
required to treat them as active tags and assume that you've made an
error that failed to close a previous string.

The Google API loader gets round this situation by doing this:

document.write('<' + 'script src="' + src + '"' +
               ' type="text/javascript"><' + '/script>');

--
Google Map API Tutorial
http://www.econym.demon.co.uk/googlemaps/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google