Ticket #2091 (closed feature: fixed)

Opened 4 years ago

Last modified 4 years ago

WMSGetFeatureInfo control: add support for mutiple WMS services

Reported by: bartvde Owned by: bartvde
Priority: minor Milestone: 2.9 Release
Component: Control.WMSGetFeatureInfo Version: 2.8 RC2
Keywords: Cc:
State: Complete

Description

It would be nice if the OpenLayers.Control.WMSGetFeatureInfo control would support querying over layers from multiple WMS services.

I'll try and work out a patch for this.

Attachments

ticket2091.patch Download (13.4 KB) - added by bartvde 4 years ago.
patch includes tests
openlayers-2091.patch Download (13.0 KB) - added by ahocevar 4 years ago.

Change History

Changed 4 years ago by bartvde

  • state set to Review

Tests pass in FF 3.5.5 and Safari 4.0.4.

Thanks for any review.

Changed 4 years ago by bartvde

patch includes tests

Changed 4 years ago by bartvde

  • owner set to bartvde

Changed 4 years ago by ahocevar

Changed 4 years ago by ahocevar

  • state changed from Review to Commit

Bart, attachment:openlayers-2091.patch Download makes the following changes:

  • Make it clear in the apidocs that with drillDown set to true, the text and request properties of the featureinfo event will only be from the last request issued
  • Use an object instead of an array for the services in the request method. This saves us an extra loop.
  • Renamed fixupStyleNames to getStyleNames and use it in a per-layer manner. Saves us some lines of code and makes it easier to read.
  • The new getStyleNames method also made it possible to simplify signature of the buildWMSOptions method and move the layerNames and styleNames concatenation into that method. Saves us some code duplication.
  • Changed the signature of the triggerFeatureInfo method so features comes last. Cosmetic change, seems more logical to me.
  • Prepended features, requestCount and numRequest members with "_" and delet them after calling triggerGetFeatureInfo.

Tests still pass in FF3.5. Please commit if you agree with my modifications.

Changed 4 years ago by bartvde

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [9874]) WMSGetFeatureInfo control: add support for mutiple WMS services, r=ahocevar (closes #2091)

Changed 4 years ago by bartvde

Thanks Andreas, I fully agree with your modifications and only corrected a typo in the comments.

Note: See TracTickets for help on using tickets.