I am still struggling with querying with mode=tile.
My layer definition is
LAYER
CLASSITEM "foo"
CONNECTION "host=localhost port=5432 dbname=db user=user password=password"
CONNECTIONTYPE POSTGIS
PROCESSING "CLOSE_CONNECTION=DEFER"
DATA "the_geom FROM a_view USING UNIQUE gid USING srid=4326"
NAME "layer"
PROJECTION
"init=epsg:4326"
END
STATUS ON
TYPE POLYGON
TEMPLATE '/path/to/template.json'
# lots of CLASS definitions
CLASS
..
END
END # LAYER "layer"
The "template.json" file looks like so
// mapserver template
[resultset layer=layer]
{
"type": "FeatureCollection",
"features": [
[feature trimlast=',']
{
"attrib1": "[attrib1]",
"attrib2": "[attrib2]",
"attrib3": "[attrib3]"
},
[/feature]
]
}
[/resultset]
My query looks like so
http://localhost/cgi-bin/app?layers=layer&mode=query&img.x=430&img.y=375&imgext=59.781131+96.2920453+69.171756+91.588920
Issue 1: I really do have a feature at the point I clicked, yet I get no
result. It is likely my query is ill-formed. Truth be told, I don't know the
complete list of params that `mode=query` takes, and I can't really find a
single place in the documentation where this information is available. One,
could someone tell me what is wrong with my query above? Two, point me to the
relevant documentation. Maybe I just don't know how to find the correct
documentation.
Issue 2: Because MapServer finds no result, it reports back as
"msQueryByPoint(): Search returned no results. No matching record(s) found."
Well, no... what I really want is an empty JSON stream.
In reality, I am sending the above query via Google Maps (which is why it is
likely I have the wrong params, or wrong value for the right params) in my
query. Once again, I would really appreciate hearing from someone who has
solved this problem already. Specifically, I need to query from Google Maps API
v3 to a MapServer backend running `mode=tile`
Oh, and I still want to know if I can run the MapServer backend as a MapScript
using `mode=tile` instead of CGI.
Sadly, if I am unable to solve this, I will have to abandon MapServer and look
at other options for this project, but I hope it won't come to that.
Many thanks,
Puneet._______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users