Google Map markers text not formated properly in FireFox
I'm using the Blueprints Ajax Map Viewer component to add a Google Map to one of my pages. This istoo cool! It really makes using Google Maps easy.
However I have a display problem in FireFox. The map has MapMarkers with markup. When you click on a marker the Info Window "balloon" is displayedwith the markup text. In IE, the Info Window is nicely wrapped. However, in FireFox, the text is displayed one word per line. So in IE it looks like:
My Marker
Description of my marker.
But, in FireFox
My
Marker
Description
of
my
marker.
Here's an actual example of the "markup."
<b>Downtown Danville</b>
Parking. Water. Restroom (in Caboose!). Museum.
I suspect it is a style problem, but don't know where to start to troubleshoot. Do I have to dig into the Themes? Any Ideas?
Cheers
Dan
[911 byte] By [
dkible] at [2007-11-26 9:31:24]

# 1
Thank you for bringing this to the forum. One of our developers suggests replacing all spaces with non-breaking spaces ( ) and provides the following code associated with the component catalog found at http://developers.sun.com/ajax/componentscatalog.jsp:
public String button1_action() {
String userLocation = (String)this.selectValue1.getValue();
if (userLocation != null) {
GeoPoint userPoint = (GeoPoint)getSessionBean1().getGeoPoints().get(userLocation);
if (userPoint != null) {
double latitude = userPoint.getLatitude();
double longitude = userPoint.getLongitude();
this.mapViewer1_center.setLatitude(latitude);
this.mapViewer1_center.setLongitude(longitude);
renderMapViewer = true;
String m = formatMarker(userPoint.toString());
MapMarker marker = new MapMarker(latitude, longitude, m);
this.mapViewer1.setMarkers( new MapMarker[] {marker} );
//this.mapViewer1.setInfo(marker);
}
} return null;
}
private String formatMarker(String text) {
text = "<b>" + text + "</b>";
text = "Location shown:
" + text;
text = text.replaceAll(" ", " ");
return text;
}
Our tutorial will also be updated shortly. I hope this helps.
~Joe Silber
Java Studio Creator Documentation
# 3
Btw, in the email version of your code the second string param in the replaceAll method is the code for a non-breaking space, but in the forum it shows as just a space.Should be text = text.replaceAll(" ", " ");