Ticket #883 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

GeoRSS layer does not use OpenLayers.Popup.WIDTH and HEIGHT for popups

Reported by: openlayers Owned by: crschmidt
Priority: minor Milestone: 2.5 Release
Component: Layer.GeoRSS Version: 2.4
Keywords: Cc:
State:

Description

GeoRSS layers specify a hardcoded width and height for the markers' popups. It would be preferable if it would use OpenLayers.Popup.WIDTH and OpenLayers.Popup.HEIGHT instead, which would allow the popup sizes to be configured via these constants.

The path is in Layers/GeoRSS.js around line 146. Simply replace data.popupSize with this:

data.popupSize = new OpenLayers.Size(OpenLayers.Popup.WIDTH,OpenLayers.Popup.HEIGHT);

Attachments

georss.patch Download (4.2 KB) - added by crschmidt 6 years ago.

Change History

Changed 6 years ago by crschmidt

Changed 6 years ago by crschmidt

  • keywords review added; georss,popups,popup size,width,height removed

The problem with OpenLayers.Popup.WIDTH/HEIGHT is that they're global -- and that means you can't specify different ones for different layers.

Instead, add popupSize APIProperty, which, if exists, will be used to override the default Popup size of 250, 120.

(The default stays, because it was optimized for GeoRSS to begin with.)

Please review.

Changed 6 years ago by tschaub

  • keywords commit added; review removed

Nicely done again. Please commit. (All tests pass in IE/FF.)

Changed 6 years ago by crschmidt

  • keywords commit removed
  • status changed from new to closed
  • resolution set to fixed

(In [4041]) 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)

Note: See TracTickets for help on using tickets.