Ticket #3037 (closed feature: fixed)

Opened 2 years ago

Last modified 2 years ago

OpenLayers.Protocol.WFS misses a setGeometryName method

Reported by: fvanderbiest Owned by: tschaub
Priority: minor Milestone: 2.11 Release
Component: Protocol.WFS Version: SVN
Keywords: Cc:
State: Needs More Work

Description

WFS protocol can be created after WFS getCapabilities, for instance, by a GeoExt WFSCapabilitiesReader. At this stage, protocol's geometryName is unkown, since it can only be obtained by WFS DescribeFeatureType.

Thus, I think we need a setGeometryName method in OpenLayers.Protocol.WFS.v1, so that its internal format can be upgraded to take into account a geometryName different than OpenLayers' default "the_geom".

Here's a simple implementation for this proposal :

    /**
     * APIMethod: setGeometryName
     * Sets the geometryName option after instanciation.
     */
    setGeometryName: function(geometryName) {
        this.geometryName = geometryName;
        this.format.geometryName = geometryName;
    },
   

It would also be very easy to do it at application level, but since the format is not an API property, it might be better to expose an API method for this purpose.

Change History

Changed 2 years ago by bartvde

I agree fvanderbiest, I ran into a similar thing a while ago (ticket:2639)

Changed 2 years ago by erilem

  • state changed from Review to Needs More Work

It sounds good. François, could you please provide a patch?

Changed 2 years ago by bartvde

  • status changed from new to closed
  • resolution set to fixed

(In [11670]) OpenLayers.Protocol.WFS misses a setGeometryName method, p=fvanderbiest, r=me,erilem (closes #3037)

Note: See TracTickets for help on using tickets.