Zn2O / gwt-google-apis

Automatically exported from code.google.com/p/gwt-google-apis
0 stars 0 forks source link

Map tooltips not working in FF2/3B5 and inconsistent in IE #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Found in Release: SVN trunk (HEAD)

Detailed description:
The tooltips do not work in Firefox 2 or the FF3 beta 5 for windows.  In
IE, they work on first hover, then do not work until a different tooltip is
shown.  This behaviour repeats (you can never see the same tooltip twice or
more in a row).

Workaround if you have one:
None.

Links to the relevant GWT Developer Forum posts:
None.

Original issue reported on code.google.com by apow...@gmail.com on 23 Apr 2008 at 9:46

GoogleCodeExporter commented 9 years ago
Would you mind posting a sample snippet of code that isn't working?

Original comment by ericzun...@gmail.com on 23 Apr 2008 at 10:06

GoogleCodeExporter commented 9 years ago
I should have mentioned, this is on a custom icon.  Do you want me to upload the
images as well?

Here is the code snippet:

HorizontalPanel panel = new HorizontalPanel();

LatLng centre = new LatLng(51.0, -114);
MapWidget map = new MapWidget(centre, 8);
map.setSize("400px", "400px");

Icon icon = new Icon("images/large.png");
icon.setShadowURL("images/large_shadow.png");
icon.setShadowSize(new Size(44,44));
icon.setTransparentImageUrl("images/large_transparent.png");
icon.setIconAnchor(new Point(22,22));
icon.setInfoWindowAnchor(new Point(22,22));

MarkerOptions options = new MarkerOptions();
options.setIcon(icon);
options.setTitle("Testing");

Marker marker = new Marker(centre, options);
map.addOverlay(marker);

panel.add(map);

RootPanel.get().clear();
RootPanel.get().add(panel);

Original comment by apow...@gmail.com on 23 Apr 2008 at 10:36

GoogleCodeExporter commented 9 years ago
I also noticed this error in the FF console today.  It seems like it could be 
related
(though this may or may not be true):

Error: The "coords" attribute of the <area shape="poly"> tag is not in the
"x1,y1,x2,y2 …" format.
Source File: http://XXXXXXXXXXXXXXX
Line: 0
Source Code:
coords=""

Original comment by apow...@gmail.com on 24 Apr 2008 at 4:09

GoogleCodeExporter commented 9 years ago
I cannot reproduce this problem using the sample - the tooltips seem to work 
well in
FF2, IE7, FF2 (linux) and Opera.  I took the HelloMaps sample and added a
'setTitle()' call in the Icon demo as follows:

k$ svn diff  
maps/samples/maps/src/com/google/gwt/maps/sample/maps/client/IconDemo.java
Index: 
maps/samples/maps/src/com/google/gwt/maps/sample/maps/client/IconDemo.java
===================================================================
--- maps/samples/maps/src/com/google/gwt/maps/sample/maps/client/IconDemo.java
(revision 289)
+++ maps/samples/maps/src/com/google/gwt/maps/sample/maps/client/IconDemo.java
(working copy)
@@ -101,7 +101,7 @@
     for (int i = 0; i < 10; i++) {
       LatLng point = new LatLng(southWest.getLatitude() + latSpan
           * Math.random(), southWest.getLongitude() + lngSpan * Math.random());-
+      options.setTitle("Marker " + i);
       map.addOverlay(new Marker(point, options));
     }
   }

But the HelloMaps sample does not make a call to icon.setTransparentImageUrl().

I think that if you are going to use icon.setTransparentImageUrl() (used by 
IE), you
must also specify icon.setImageMap() (for non IE browsers).  My understanding 
is that
you only need to use these if the clickable region of the marker is different 
from
the non-transparent part of the icon image.  From the JS Maps API documentation:

transparent      String     The URL of a virtually transparent version of the 
foreground
icon image used to capture click events in Internet Explorer. This image should 
be a
24-bit PNG version of the main icon image with 1% opacity, but the same shape 
and
size as the main icon.

imageMap    Array of Number     An array of integers representing the x/y 
coordinates of
the image map we should use to specify the clickable part of the icon image in
browsers other than Internet Explorer.

You might try asking on the Maps developer mailing list on 
http://groups.google.com/
and see if they can shed some further light.

Original comment by galgwt.reviews@gmail.com on 24 Apr 2008 at 6:52

GoogleCodeExporter commented 9 years ago
Adding an image map seemed to solve the problem.  

The notes should probably be updated to reflect the actual impact of setting a
transparent image.  The docs -- as you've pasted in your comment -- state that 
they
affect click events in Internet Explorer.  I'd suggest updating those docs to
indicate that they affect mouseover events on both IE and other browsers.  As 
well,
there should be an indication that not including the image map breaks proper
behaviour on IE.

Original comment by apow...@gmail.com on 25 Apr 2008 at 5:05

GoogleCodeExporter commented 9 years ago
The javadoc does not appear to be updated for Icon and MarkerOptions classes at 
the
least.  All the classes in the com.google.gwt.maps.client.overlay package 
should be
checked and updated with the current Maps API documentation..

Original comment by galgwt.reviews@gmail.com on 25 Apr 2008 at 5:41

GoogleCodeExporter commented 9 years ago

Original comment by mmendez+personal@google.com on 16 Jun 2008 at 2:36

GoogleCodeExporter commented 9 years ago
This patch adds documentation for MarkerOptions and the implementation of a 
missing
method Marker.setTitle()

Original comment by galgwt.reviews@gmail.com on 23 Jun 2008 at 5:56

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Added unit test

Original comment by galgwt.reviews@gmail.com on 23 Jun 2008 at 6:14

Attachments:

GoogleCodeExporter commented 9 years ago
Review by mmendez. Committed as r368.

Original comment by galgwt.reviews@gmail.com on 26 Jun 2008 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 13 Oct 2008 at 8:54

GoogleCodeExporter commented 9 years ago

Original comment by galgwt.reviews@gmail.com on 11 Dec 2008 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by zundel@google.com on 21 Dec 2009 at 1:57