Opened 16 years ago

Closed 16 years ago

#24 closed enhancement (fixed)

Setting displayed attributes on query

Reported by: aboudreault Owned by: aboudreault@…
Priority: P2 Milestone: 1.1
Component: MapServer Version: 1.0.4
Severity: Major Keywords:
Cc: jlacroix@…, dmorissette@…, madair@…, pspencer@…, yassefa@… Browser: All
External ID: Operating System: All
state: Approved

Description

We was searching a way to control the attributes displayed in a query result. After a moment of reflection, we decided to include specifics metadatas names inside the mapfile for displayed attributes. (ie. query_include_items, query_exclude_items and query_[item]_alias for alias) This would follow the approach used in configuring WMS and WFS services. If you have a better prefix in mind than "query_*" then send your ideas along. We decided this solution because we do not want modify any widget for this mapserver feature and we do not want to expose mapfile information to the client (JavaScript? code) as a good practice for security reasons.(ie. the metadata name for the attributes to be displayed)

Change History (7)

comment:1 by pagameba, 16 years ago

Milestone: 1.0.41.0.5
Version: 1.0.31.0.4

comment:2 by aboudreault, 16 years ago

Cc: yassefa@… added

This is almost done. Is anyone can review/comment it for commiting to the trunk? At the moment it's commited into aboudreault sandbox. Only /MapServer/php/Query.php is the file modified for this ticket.

comment:3 by jfournier, 16 years ago

I have checked out your sandbox and have the MapServer standard sample working. Do you have some basic instructions on how I should be testing this new functionality? I see that Query.php is getting called:

{"hasSelection":true,"layers":park,"park":{"featureCount":2},"queryFile":"d:/ms4w/tmp/sess_47f0ffc815ff3

/query.qry"}

so it's working. I'm just unsure of how to configure the results. What's the metadata syntax for queryable items?

comment:4 by anonymous, 16 years ago

Alan,

I personally like the idea. I think this same meta data idea could be extended to add things like _item_type (and maybe validity) to allow building a more "intelligent" search widget for MapServer. I do not any reason not to commit this.

comment:5 by pagameba, 16 years ago

(In [1354]) Re #24, minor reformatting for code style consistency.

comment:6 by pagameba, 16 years ago

Milestone: 1.0.51.1
state: NewApproved

Alan, I've reviewed and the changes look fine. I've updated Query.php with some minor formatting changes:

  • I would like to keep bracketing consistent and most of fusion uses the style of keeping the opening { bracket on the same line as the code that starts the block
  • I prefer that all blocks be bracketed so I've added them around one-line if statements even though they aren't strictly required.

Please feel free to commit to trunk referencing this ticket. Along with this commit, I would like you to update the wiki with docs on how to use this new feature.

comment:7 by aboudreault, 16 years ago

Resolution: fixed
Status: newclosed

(In [1361]) closes #24: setting displayed attributes on query

Note: See TracTickets for help on using tickets.