Re[2]: [ka-Map-users] how to realize such effect

Victor bobbie at
Mon Aug 6 03:03:36 EDT 2007

> I'm a little confused about what you say.  Do you mean when i click one
> point , it's just ask for a query?
> because i think query is just i type in some word, and then something happen
> to look up in some tables.
> I look through your suggestion and the URL you gave me , but found no
> example as i asked.
> i think it's very popular application , maybe someone has realized before.
> I'm a beginner, so maybe i misunderstand what you say.

(: Ok, not a problem.  I will try to better explain my answer, using
the application I am currently developing as an example.

So, I have a situation, when there is a set of locations where some
resources are placed.  Each resource has its coordinates, and a set of
attributes (like dwelling depth, water temperature and so on).  The
task is to make a map of Ukraine with these locations marked on the
map.  And, when the user clicks the mark with the <<info>> tool, a
small window should pop-up with detailed resource description.

It seems to me, that the task I am solving is very similar to what you
are doing.

So, I have setup a table in PostgreSQL database with PostGIS
extensions describing the resources I have.  Then, I have modified the
myQuery function to call my custom script to process the user clicks
with the <<info>> tool.

As far as I understand, myQuery function is responsible for user
queries processing.  It can be found in the startUp.js script
corresponding to the User Interface you have choosen (kaExplorer or

If you look at this function definition, you will see that it takes
some information about the map, geographical coordinates, where the
user clicked, and calls some script (map_query_float.php by default).
In my case, I use geographical coordinates to find the corresponding
resource based on the distance to it (see PostGIS manual for detailed
instructions how to do this efficiently).  When the resource is
identified, my script builds a pretty table with resource description.

The <<basic>> map is rendered from the Shapefiles, and resources are
taken from the database (see MapServer manuals for detailed

So, this seems to me a pretty good solution,

With best regards,


> 2007/8/5, Victor <bobbie at>:
> >
> > > how to realize such effect. i add some point data, and when i click one
> > > point , it's open a new windows do some work(show a image, or execute a
> > > python script
> >
> > Greetings Stin,
> >
> > what you are asking for, sounds very similar as the Query system described
> > on the
> > ka-Map WIki:
> >
> >
> >
> > Basically speaking, you should redefine the myQuery function in the
> > startUp.js file
> > (either tools/kaExplorer or in the aqua UI).
> >
> > Then, it is possible to use PostGIS functions to locate the point of the
> > layer nearch
> > which the mouse was clicked.
> >
> > With best regards,
> >
> > Victor
> >
> >
> >

-- реклама -----------------------------------------------------------
Форекс Клуб. Научим зарабатывать на валютной бирже.

More information about the ka-Map-users mailing list