Opened 6 years ago

Closed 6 years ago

#1976 closed feature (fixed)

Format.WMSGetFeatureInfo: parse geometry if present for msGMLOutput

Reported by: bartvde Owned by: ahocevar
Priority: minor Milestone: 2.8 Release
Component: Format Version: 2.7
Keywords: Cc:
State: Complete

Description


Attachments (2)

ticket1976.patch (4.1 KB) - added by bartvde 6 years ago.
patch implementing geometry node parsing for Mapserver
ticket1976-2.patch (4.4 KB) - added by bartvde 6 years ago.
new patch taking into account Erik's remark

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by bartvde

patch implementing geometry node parsing for Mapserver

comment:1 Changed 6 years ago by bartvde

  • State set to Review

comment:2 Changed 6 years ago by bartvde

  • Milestone changed from 2.9 Release to 2.8 Release

comment:3 Changed 6 years ago by elemoine

Bart, could we avoid creating a new Format.GML object for each feature by caching the first created format:

parseGeometry: function(node) {
    // we need to use the old Format.GML parser since we do not know the  
    // geometry name
    if(!this.gmlFormat) {
        this.gmlFormat = new OpenLayers.Format.GML();
    }
    var feature = this.gmlFormat.parseFeature(node); 
    var geometry = null; 
    if(feature && feature.geometry) { 
        geometry = feature.geometry.clone(); 
        feature.destroy(); 
    } 
    return geometry; 
},

comment:4 Changed 6 years ago by bartvde

Hi Eric, sure makes sense, I'll adapt the patch.

Changed 6 years ago by bartvde

new patch taking into account Erik's remark

comment:5 Changed 6 years ago by tschaub

  • Owner changed from tschaub to ahocevar

comment:6 Changed 6 years ago by ahocevar

  • Status changed from new to assigned

comment:7 Changed 6 years ago by ahocevar

  • Resolution set to fixed
  • State changed from Review to Complete
  • Status changed from assigned to closed

(In [9178]) Added geometry parsing for Mapserver output. Thanks bartvde for the patch. r=elemoine,me (closes #1976)

Note: See TracTickets for help on using tickets.