Problems with openInfowindowHTML
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:
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
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.. :-(
You must
Sign in before you can post messages.
You do not have the permission required to post.
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
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:
> Can you post a link to your map?
> Ralph
You must
Sign in before you can post messages.
You do not have the permission required to post.
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
You must
Sign in before you can post messages.
You do not have the permission required to post.
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:
> 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:
> > Can you post a link to your map?
> > Ralph
You must
Sign in before you can post messages.
You do not have the permission required to post.
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:
> 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:
> > 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:
> > > Can you post a link to your map?
> > > Ralph
You must
Sign in before you can post messages.
You do not have the permission required to post.
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
> From: andy
> 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: > > Can you post a link to your map?
You must
Sign in before you can post messages.
You do not have the permission required to post.