Google Groups Home
Help | Sign in
Problems with openInfowindowHTML
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
  9 messages - Collapse all
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
andy  
View profile
 More options Jul 5, 5:31 pm
From: andy <n4p...@gmx.de>
Date: Sat, 5 Jul 2008 05:31:59 -0700 (PDT)
Local: Sat, Jul 5 2008 5:31 pm
Subject: Problems with openInfowindowHTML
Hey,

i'm trying to get my google maps working.. But i have a problem with
Infowindows, which should open, if they are clicked..
my Code:

<function placeMarker() {
  var listener = GEvent.addListener(map, "click", function(marker,
latlng) {
    if (latlng) {
      var color = getColor(true);
      var marker = new GMarker(latlng, {icon: getIcon(color),
draggable: true});
      map.addOverlay(marker);
      var cells = addFeatureEntry("Hinweis " + (++markerCounter_),
color);
      updateMarker(marker, cells);
      GEvent.addListener(marker, "dragend", function() {
        updateMarker(marker, cells);
      });
      GEvent.addListener(marker, "click", function() {
         openwindow(marker);
      });
    }
  });

}

function openwindow(marker) {
 map.openInfoWindow(marker, "Html-Code");
 };
-------------------------------------------------------

I'm searching my mistake for hours now, but I haven't got the faintest
idea why the Infowindows don't open..

Can anybody help me?

Thanks a lot :)

greetz from Germany


    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.
Ralph Ames  
View profile
 More options Jul 5, 5:36 pm
From: Ralph Ames <ralph.a...@gmail.com>
Date: Sat, 5 Jul 2008 15:36:25 +0300
Local: Sat, Jul 5 2008 5:36 pm
Subject: RE: Problems with openInfowindowHTML
    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.
andy  
View profile
 More options Jul 5, 6:10 pm
From: andy <n4p...@gmx.de>
Date: Sat, 5 Jul 2008 06:10:47 -0700 (PDT)
Local: Sat, Jul 5 2008 6:10 pm
Subject: Re: Problems with openInfowindowHTML
Thank your Ralph :)
I've found a silly mistake, but the InfoWindows don't work yet..

new Code:
function placeMarker() {
  var listener = GEvent.addListener(map, "click", function(marker,
latlng) {
    if (latlng) {
      var color = getColor(true);
      var marker = new GMarker(latlng, {icon: getIcon(color),
draggable: true});
      map.addOverlay(marker);
      var cells = addFeatureEntry("Hinweis " + (++markerCounter_),
color);
      updateMarker(marker, cells);
      GEvent.addListener(marker, "dragend", function() {
        updateMarker(marker, cells);
      });
      GEvent.addListener(marker, "click", function() {
      marker.openInfoWindowHTML("Html-Code");
      });
    }
  });

}

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

mhh.. :-(


    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.
Ralph Ames  
View profile
 More options Jul 5, 6:13 pm
From: Ralph Ames <ralph.a...@gmail.com>
Date: Sat, 5 Jul 2008 16:13:22 +0300
Local: Sat, Jul 5 2008 6:13 pm
Subject: RE: Problems with openInfowindowHTML
Can you post a link to your map?

Ralph


    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.
andy  
View profile
 More options Jul 5, 6:35 pm
From: andy <n4p...@gmx.de>
Date: Sat, 5 Jul 2008 06:35:47 -0700 (PDT)
Local: Sat, Jul 5 2008 6:35 pm
Subject: Re: Problems with openInfowindowHTML
No i'm working local with apache..  but i can send you the complete
sourcecode if you want.. or the file :)

On 5 Jul., 15:13, Ralph Ames <ralph.a...@gmail.com> wrote:


    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 Jul 5, 8:28 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Sat, 5 Jul 2008 16:28:23 +0100
Local: Sat, Jul 5 2008 8:28 pm
Subject: Re: Problems with openInfowindowHTML
One possibility (of many) is that you've not declared a sensible
.infoWindowAnchor for that icon.

--
http://econym.googlepages.com/index.htm
The Blackpool Community Church Javascript Team


    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.
Diego_mg  
View profile
 More options Jul 5, 8:39 pm
From: Diego_mg <diegogur...@gmail.com>
Date: Sat, 5 Jul 2008 08:39:33 -0700 (PDT)
Local: Sat, Jul 5 2008 8:39 pm
Subject: Re: Problems with openInfowindowHTML
unction placeMarker() {
  var listener = GEvent.addListener(map, "click", function(marker,
latlng) {
    if (latlng) {
      var color = getColor(true);
      var marker = new GMarker(latlng, {icon: getIcon(color),
draggable: true});
      map.addOverlay(marker);
      var cells = addFeatureEntry("Hinweis " + (++markerCounter_),
color);
      updateMarker(marker, cells);
      GEvent.addListener(marker, "dragstart", function() {
        updateMarker(marker, cells);
      });
      GEvent.addListener(marker, "dragend", function() {
        updateMarker(marker, cells);
      });
/// you dont need to put this just put a else below
///      GEvent.addListener(marker, "click", function() {
///      marker.openInfoWindowHTML("Html-Code");
 ///     });
    }
//here the click
else{
marker.openInfoWindowHTML("Html-Code");

}
  });
}

try at this form
On Jul 5, 10:35 am, andy <n4p...@gmx.de> wrote:


    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.
andy  
View profile
 More options Jul 5, 11:42 pm
From: andy <n4p...@gmx.de>
Date: Sat, 5 Jul 2008 11:42:08 -0700 (PDT)
Local: Sat, Jul 5 2008 11:42 pm
Subject: Re: Problems with openInfowindowHTML
No, the else-solution doesn't work..  :((

On 5 Jul., 17:39, Diego_mg <diegogur...@gmail.com> wrote:


    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.
Michael Geary  
View profile
 More options Jul 5, 11:52 pm
From: "Michael Geary" <m...@mg.to>
Date: Sat, 5 Jul 2008 11:52:33 -0700
Local: Sat, Jul 5 2008 11:52 pm
Subject: RE: Problems with openInfowindowHTML
Please don't do that! People here prefer that you post a link to a page they
can load themselves, and for good reason.

You can get a free Google Pages account and post test pages there.

But even before you do that, you need some good debugging tools so you can
find more of these problems on your own. Go get the Firebug extension for
Firefox. While you're at it, get the Web Developer Toolbar extension -
another must-have. Load your page with the Firebug console enabled and click
your marker. What does it say?

Firebug won't show all of your bugs this easily. But it will show a lot of
them, and you can use its various debugging tools to track down others.

Also take note of the other comments you received. It sounds like the bug I
noticed is not the only one.

There are numerous working examples that you can compare your code with -
Mike's tutorials that he gave you the link for, and the examples in the Maps
API documention:

http://code.google.com/apis/maps/documentation/overlays.html#Markers

-Mike


    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
©2008 Google