I see one more problem in your configuration.
You probably missed that to use the "id_attribute_string" metadata
correctly, some extra info must be retrieved from your postgis table.
You should set something like following in your data connection :
DATA "the_geom from (select the_geom, feat_name, oid from
lgst.sel_admingebiete) as foo using SRID=4326"
Regards
Pierre GIRAUD
Alexandre Fellay a écrit :
Hi Dirk,
ID recentering has to be done on a msLayer, not a CW layer; in your
case, you should have in location.ini :
idRecenterLayers = Gemeinden, Landkreise, Ortschaften
It's probably not important for your present problem, but the metadata
exported_values is useless here.
Alexandre Fellay
Dirk Jesko wrote:
Hello,
eventhough my configuration is almost identical to that of demoCW3,
the idRecenterLayer does not work. I always get "Recenter Id
canceled, unable to find selected Id."
The configuration is as follows:
server location.ini:
recenterMargin = 10
recenterDefaultScale = 50000
client location.ini:
idRecenterActive = true
idRecenterLayers = layLk, layGem, layOrt
all three Layers are defined in layers.ini as follows:
layers.grpNavteq.className = LayerGroup
layers.grpNavteq.label = "Grenzen"
layers.grpNavteq.children = layLk, layGem, layOrt
layers.layLk.className = Layer
layers.layLk.msLayer = Landkreise
layers.layLk.label = Landkreise
layers.layGem.className = Layer
layers.layGem.msLayer = Gemeinden
layers.layGem.label = Gemeinden
layers.layOrt.className = Layer
layers.layOrt.msLayer = Ortschaften
layers.layOrt.label = Ortschaften
The layers look like
LAYER
NAME "Gemeinden"
CONNECTIONTYPE postgis
CONNECTION "user=web password=... dbname=... host=... port=..."
DATA "the_geom from lgst.sel_admingebiete using SRID=4326"
FILTER "feat_type='GEMEINDE'"
STATUS ON
TYPE POLYGON
MAXSCALE 500000
TOLERANCE 20
PROJECTION
"init=epsg:4326"
"towgs84=-598.1,-73.7,-418.2,-0.202,-0.045,2.455,-6.70"
END
METADATA
"exported_values" "id_attribute_string"
"id_attribute_string" "feat_name|string"
END
LABELITEM "feat_name"
LABELMAXSCALE 250000
CLASS
NAME "Gemeinden"
STYLE
SYMBOL "circle"
SIZE 1
COLOR -1 -1 -1
OUTLINECOLOR 255 128 0
END
LABEL
ANGLE 0
WRAP "_"
COLOR 102 255 153
SHADOWCOLOR 0 0 0
SHADOWSIZE 1 1
TYPE TRUETYPE
FONT "arial-bold"
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS TRUE
MINDISTANCE 20
BUFFER 4
END
END
END
Some more information:
- No query is issued to Postgres (I checked it in the log file)
- It seems that not all attributes of the IdSelection object are
filled. This is what it looks like at the end of handleIdRecenter:
[0] => IdSelection Object
(
[layerId] => layLk
[idAttribute]
=> [idType] =>
[selectedIds] => Array
(
[0] => Magdeburg
)
[className] => IdSelection
)
I would appreciate if someone could tell me why it does not work.
Kind regards,
Dirk
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users
--
_________________________________________________________
Pierre GIRAUD
Géomaticien, Analyste
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 93
Mail : [EMAIL PROTECTED]
http://www.camptocamp.com
_______________________________________________
Cartoweb-users mailing list
[email protected]
http://lists.maptools.org/mailman/listinfo/cartoweb-users