Ticket #947 (closed feature: fixed)

Opened 6 years ago

Last modified 6 years ago

Allow Custom Popup for Feature

Reported by: euzuro Owned by:
Priority: minor Milestone: 2.5 Release
Component: Feature Version: 2.4
Keywords: Cc:
State:

Description

Right now the default popup for an OpenLayers.Feature is OpenLayers.Popup.AnchoredBubble. Which is fine, since that's basically our prettiest popup at this point.

It shouldn't however, be the only option. We should allow the user to swap it for another OpenLayers.Popup, including perhaps one of his/her choice.

To do this, we simply add a 'popupClass' api-property to the Feature.

Attachments

popupClass.patch Download (5.9 KB) - added by euzuro 6 years ago.

Change History

Changed 6 years ago by euzuro

Changed 6 years ago by euzuro

  • keywords review added

attached patch. add 'popupClass' property to OpenLayers.Feature class. Default is Openlayers.Popup.AnchoredBubble.

Add new tests for createPopup() and destroyPopup() functions.

rearrange slightly the order of inclusion in OpenLayers.js

All tests pass in IE6 and FF. I even built a singlefile version and ran tests on it (slow as sin) and they all pass.

This patch does not change default behaviour. It only extends it, making OpenLayers more customizable. Better.

please review

Changed 6 years ago by tschaub

  • keywords commit added; review removed

bien hecho

Tests pass IE/FF for me too.

Please commit.

Changed 6 years ago by euzuro

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

(In [4128]) allow for custom popup class on a feature. (Closes #947)

Note: See TracTickets for help on using tickets.