[mapserver-users] map extent with point based mapqueries

Carlo A. Bertelli bertelli at charta.acme.com
Fri Aug 17 08:58:16 EDT 2001


Hello,

I'm trying to set up a very simple map application with some mapinfo tabs
and a point layer.

I should show a shop location starting from an interactive base map (that
works).

Querying one point
or
with an alphanumeric query on the same table
(preferably a Mapinfo table, but a shapefile could be the same, just
querying the DBF part)

it should provide:
*  attributes for the shop (if I use the mapinfo table this asks for v. 3.5)
*  three maps:
  --  one whith the shop location at a provincial level
  --  one with the shop with large boundaries (say at a urban area)
  --  a bigger one with small boundaries (say at the block level).

I tried to start from the example provided in the MapServer Test Suite:
(http://maps.dnr.state.mn.us/mapserver_demos/tests/)

One of the examples provided something very near to what I was looking for,
that's the "Case 3: Simple ItemQuery With QueryMap" (what I want is indeed
very simple)
(http://maps.dnr.state.mn.us/mapserver_demos/tests/itemquery/test.html)

The query template produces two maps, a reduced version of the starting map
(the one the user clicked on when starting the query) and a map created on
the fly. The template
(http://maps.dnr.state.mn.us/mapserver_demos/tests/itemquery/case3_template.html
) is that simple (and I utterly simplified it):
This is just a simple dump of a few attributes for an individual polygon
in the test suites counties layer:

-------
Attributes:<BR>
	Name: [SHOP_NAME]<br>
	ID Number: [ID]<br>
	Type: [SHOP_TYPE]<br>

Map of the query results:<BR>
<img src="[img]" height="300" width="300">
<img
src="/cgi-bin/mapserv?map=[map]&item=ID&value=[ID]&mode=itemquerymap&mapext=shap
es" height="300" width="300">
-----

As Steve 'pointed out' (this is really the case), mapext is not appropriate
for points (a point has no EXTension). So, he suggested to use scale or
xyext with a buffer around the point.

Now, this is a start of several problems:

1. We should use v. 3.5 if we want to use a MapInfo Tab and v. 3.5 has some
differences wich are not extensively documented;
2. v. 3.5 shows some strange behaving, say it writes 'here: starting to
return query' after the generated html;
3. The query result only shows the layer on which I perform the query (this
is probably due to a misunderstanding: maybe I'm supposed to put the
template clause inside every layer I would like to show in the querymap,
but how shoud I specify what layer should be queried? I have ID fields in
every Mapinfo table).

Any suggestion?

Ciao
	Carlo





--------------------------------------------------------------------------
Carlo A. Bertelli
   Charta   servizi e sistemi per il territorio e la storia ambientale srl
            Dipendenze del palazzo di Clemente Doria,
            via alla Chiesa della Maddalena 9/2 16124      Genova (Italy)
            tel. +39(0)10 2475439          fax +39(0)10 2475439
    e-mail: bertelli at charta.acme.com      http://www.charta.acme.com
--------------------------------------------------------------------------





More information about the mapserver-users mailing list