Closed GoogleCodeExporter closed 9 years ago
A workaround is to get the LatLng from the Marker object and then open the
infowindow
on the map with that LatLng instead of opening on the Marker.
Original comment by galgwt.reviews@gmail.com
on 22 Jan 2009 at 7:32
I just thought that a few minutes after submitting this issue.
Anyway, digging a little deeper I found that 'b' is undefined in this line of
code:
function vr(a){var b=a.infoWindowAnchor,c=a.iconAnchor;return new
D(b.x-c.x,b.y-c.y)}
I have no idea what variable 'a' is, but looking at the Google Maps API
Reference,
the only type that has a infoWindowAnchor is a GIcon. So, it should be that.
I'll
take a look in my code where I create these icons, and try to set
infoWindowAnchor to
see the results.
Original comment by vitor.tc...@gmail.com
on 22 Jan 2009 at 7:42
As I expected, invoking icon.setInfoWindowAnchor(Point.newInstance(10, 0));
solves
this problem.
Original comment by vitor.tc...@gmail.com
on 22 Jan 2009 at 8:03
This is a similar issue described in issue 124 related to icons.
Is your code really using a Marker or are you using an Icon and registering a
click
handler on it? If you are creating a Marker from a custom icon, the API fails
in
different ways depending on whether you've initialized the proper values. If
you can
give me more details, we can work out a way to make this more bulletproof.
Also, what version of the Maps API are you using (the output of
Maps.getVersion())
There is some monkey business in Overlay.createPeer() that may need some
sorting (or
an upgrade to a newer version).
Original comment by galgwt.reviews@gmail.com
on 30 Jan 2009 at 4:48
I am using a Marker with a custom Icon.
Below is the code that was raising this problem:
Icon icon = Icon.newInstance(imgUrl);
icon.setIconSize(Size.newInstance(20, 34));
icon.setIconAnchor(Point.newInstance(9, 34));
icon.setShadowURL(UrlResolver.shadowIcon());
icon.setMaxHeight(13);
MarkerOptions opts = MarkerOptions.newInstance(icon);
opts.setDraggable(draggable);
opts.setBouncy(true);
Marker marker = new Marker(point, opts);
Now, it started to work fine when added this:
icon.setInfoWindowAnchor(Point.newInstance(10, 0));
The problem is that without using GWT.UncaughtExceptionHandler in FF3, nothing
happens, and no message is shown in the HostedBrowser. I believe that a custom
icon
should come with the default values of the google maps icon. But that is not a
problem of gwt-maps, it is from Google Maps API.
The version I am using of the Maps API is 140g.
Original comment by vitor.tc...@gmail.com
on 30 Jan 2009 at 5:05
the maps v2 api is now deprecated.
Original comment by zundel@google.com
on 28 May 2010 at 6:19
Workaround:
Icon icon = Icon.newInstance(Icon.DEFAULT_ICON);
icon.setImageURL("some-icon-url");
this sets it up properly
Original comment by demisone@gmail.com
on 25 Jun 2010 at 12:33
Original issue reported on code.google.com by
vitor.tc...@gmail.com
on 22 Jan 2009 at 7:22Attachments: