[mapserver-users] Отв.: how to use attribute name in template with "_"
Lime, Steve D (DNR)
Steve.Lime at state.mn.us
Thu Aug 2 11:01:59 PDT 2012
Item names are case sensitive so try [OGC_FID] or try the [item …] tag, e.g.:
[item name=’ogc_fid’]
Steve
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of alexkartatemp-1 at yahoo.com
Sent: Wednesday, August 01, 2012 6:49 AM
To: Donald Kerr; mapserver-users at lists.osgeo.org
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 <donald.kerr at dkerr.co.uk<mailto:donald.kerr at dkerr.co.uk>>
Кому: alexkartatemp-1 at yahoo.com<mailto:alexkartatemp-1 at yahoo.com>; mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Отправлено: среда, 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: mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>
[mailto:mapserver-users-bounces at lists.osgeo.org<mailto:mapserver-users-bounces at lists.osgeo.org>] On Behalf Of
alexkartatemp-1 at yahoo.com<mailto:alexkartatemp-1 at yahoo.com>
Sent: 31 July 2012 23:42
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120802/48b65bf7/attachment.htm>
More information about the MapServer-users
mailing list