[ka-Map-users] query in ka-map with mapserver
happyforev1 at gmail.com
Wed Dec 23 21:14:21 EST 2009
Think you for your quick reply, Hajime. However, I still have two quetions:
1、what do "fields" mean? Are they the attributes or shapes from my database
or anything else?
2、what is the template.html used for ? Does it give the query rules or
thank you again, and I will read the resources you give me here.
2009/12/23 Hajime TANAKA <hajime.tanaka at tufts.edu>
> according to
> you need
> "queryable" "true"
> "fields" "A:alias_A, B:alias_B, C:alias_C" # the selected fields
> will be displayed on the left panel with alias names
> in a layer. and you also need to make template.html for the layer
> <!-- MapServer Template -->
> <head><title>Global Template</title></head>
> <li> [A]
> <li> [B]
> <li> [C]
> #---------------template.html end---------------#
> and, put TEMPLATE in CLASS
> # skip #
> TEMPLATE template.html
> # skip #
> I remember <!-- Mapserver Template--> is necessary.
> 2. You need to entirely include the polygon with the rectangle
> 3. My understanding is that when query is successful, MS_SUCCESS will
> be returned as the value of 1
> map_query_float.php, first getResult($a) should be changed to
> getResult(0) for multiple layer queries.
> I hope this helps,
> 2009/12/23 王连波 <happyforev1 at gmail.com>:
> > hello all,
> > I want to query something from my map which is displayed through ka-map
> > from mapserver. However, the problem is I am not clear about how to use
> > query. Should I add QUERYMAP in my mapfile, or what is ITEMQUERY mean? I
> > have read the MapServer docs, but it is too little for me to understand.
> > there some examples or resources for me, thank you in advance.
> > BTW, in ka-map there is a file named map_query_float.php. I read it and
> > something, but I am not clear about that:
> > 1、the "fields" I should add into my mapfile mean what? Is it the queried
> > shape's attributes from the table where I store the shapes in my
> > or something else?
> > 2、If I want to query something (eg. population) of a city in a state,
> > I just draw a box to select part of the city, can I get that city's
> > population or that just the cities which are totally selected in the box
> > be queried? I hope someone can understand me and give me some hints.
> > 3、this is a simple question: why I can not get the "if" sentences
> > with "if ($check_query == MS_SUCCESS)" , while it is ok with "if
> > ($check_query == 1)"? (I had loaded PHP/MapScript module in my PHP script
> > file.)
> > Any help is appreciated.
> > --
> > 天道酬勤
> > _______________________________________________
> > ka-Map-users mailing list
> > ka-Map-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ka-map-users
> Hajime Tanaka
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ka-Map-users