add support for specifying the GeoRSS popup size as an option to the layer.
Default behavior stays the same, but you can now specify popupSize as a layer option to the GeoRSS constructor. (Closes #883) git-svn-id: http://svn.openlayers.org/trunk/openlayers@4041 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -40,6 +40,13 @@ OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
* for this GeoRSS layer.
|
||||
*/
|
||||
icon: null,
|
||||
|
||||
/**
|
||||
* APIProperty: popupSize
|
||||
* {<OpenLayers.Size>} This determines the size of GeoRSS popups. If
|
||||
* not provided, defaults to 250px by 120px.
|
||||
*/
|
||||
popupSize: null,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Layer.GeoRSS
|
||||
@@ -171,7 +178,8 @@ OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, {
|
||||
data.icon = this.icon == null ?
|
||||
OpenLayers.Marker.defaultIcon() :
|
||||
this.icon.clone();
|
||||
data.popupSize = new OpenLayers.Size(250, 120);
|
||||
|
||||
data.popupSize = this.popupSize ? this.popupSize.clone() : new OpenLayers.Size(250, 120);
|
||||
if ((title != null) && (description != null)) {
|
||||
contentHTML = '<div class="olLayerGeoRSSClose">[x]</div>';
|
||||
contentHTML += '<div class="olLayerGeoRSSTitle">';
|
||||
|
||||
Reference in New Issue
Block a user