Item names are case sensitive so try [OGC_FID] or try the [item …] tag, e.g.:
[item name=’ogc_fid’] Steve From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, August 01, 2012 6:49 AM To: Donald Kerr; [email protected] Subject: [mapserver-users] Отв.: how to use attribute name in template with "_" Donald, thank you very much for your reply, I already have the string "gml_featureid" "ogc_fid" in the map file. Here is my template.html: *************** <!-- MapServer Template --> <html><body> <font size+1><b>קבר</b></font><p> <table cellpadding=5 cellspacing=2 border=0> <tr bgcolor=#CCCCCC><th>Attribute</th><th>Value</th></tr> <tr><td>הפניה:</td><td>[ogc_fid]</td></tr> <tr><td>שם מלא:</td><td>[shem_mal]</td></tr> <tr><td>תאריך:</td><td>[tarih]</td></tr> <tr><td>אידי:</td><td>[unick_id]</td></tr> </table><p> </body></html> *********** There are 2 more fields with "_", them work good. Problem only with [ogc_fid] (I tryed to change register - also don't work). here is schema of layer (spatialite myfile.sqlite -> .shema layername): *********** CREATE TABLE 'gves' ( OGC_FID INTEGER PRIMARY KEY, "GEOMETRY" POINT, 'gush' VARCHAR, 'halka' FLOAT, 'ms_sh' FLOAT, 'ms_sh_1' FLOAT, 'mispar' FLOAT, 'shem' VARCHAR, 'mishpaha' VARCHAR, 'min' VARCHAR, 'tarih' VARCHAR, 'tarih_1' VARCHAR, 'x' FLOAT, 'y' FLOAT, 'tashlum' VARCHAR, 'ktovet' VARCHAR, 'moza' VARCHAR, 'ptira' VARCHAR, 'knia' VARCHAR, 'shem_mal' VARCHAR, 'gusheng' VARCHAR, 'kvarim' FLOAT, 'unick_id' VARCHAR); *********** May be OGC_FID is some sort of special field in spatialite files. As you see in schema it looks not as another fields. Of cource, I can create a new field and copy there values from OGC_FID, but I want to try to find the way without changing the struture of table. Thank you for help Best regards, Alexey ________________________________ От: Donald Kerr <[email protected]<mailto:[email protected]>> Кому: [email protected]<mailto:[email protected]>; [email protected]<mailto:[email protected]> Отправлено: среда, 1 августа 2012 10:08 Тема: RE: [mapserver-users] how to use attribute name in template with "_" Try this line in the LAYER METADATA: LAYER METADATA "gml_featureid" "ogc_fid" END END Regards, Donald METADATA -----Original Message----- From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of [email protected]<mailto:[email protected]> Sent: 31 July 2012 23:42 To: [email protected]<mailto:[email protected]> Subject: [mapserver-users] how to use attribute name in template with "_" Hello, I use mapserver 6.0.3 I created template for getting info from (OpenLayers WMSGetFeatureInfo method) spatilite file. I can't get access to the field "ogc_fid" from template. I think it is because of symbol "_" in field name. What I can do to get [ogc_fid] value from template? Thank you
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
