[OpenLayers-Users] GeoRSS layer; what CSS to tweak to make it look nicer?

Gregor Mosheh gregor at hostgis.com
Fri Aug 3 02:01:55 EDT 2007


> So, I have my map running and displaying GeoRSS points.
> I would like to configure the markers' popup boxes so they look a little 
> nicer, maybe add a border and a background color, that sort of thing.

I seem to have partly answered my own question, by examining the source, 
and will mention it here for posterity.

The JS to generate the popups is in lib/OpenLayers/Layer/GeoRSS.js 
around line 150. The CSS items in question are:
div.olPopup                  The popup div itself.
div.olPopupContent         Inside the popup, contains the items below.
div.olLayerGeoRSSClose     The X in the popup.
div.olLayerGeoRSSTitle     The title.
div.olLayerGeoRSSTitle link   The title hyperlink itself.
div.olLayerGeoRSSDescription   The description.



A mental note: width and height cannot be used in this CSS, as the size 
of popups is set by some constants in Layer/GeoRSS.js at line 147. Might 
I suggest to the OL team that this line be modified to read as follows, 
thus allowing popup sizes to be adjusted instead of being hardcoded?
data.popupSize = new OpenLayers.Size(OpenLayers.Popup.WIDTH,
                                      OpenLayers.Popup.HEIGHT);


-- 
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
  only if you can restore." - AMANDA



More information about the Users mailing list