AW: [mapserver-users] How do I Control QUERY Output?

Steve Lime Steve.Lime at state.mn.us
Wed Dec 9 13:56:10 PST 2009


The AJAX method will work nicely. This site does just that:

  http://www.dnr.state.mn.us/waters/csg/index.html 

If you use the identify tool to click on a point the query output is
placed in an Ext window. If
you hover over a point very simple query output is stuffed in a div.

Steve

>>> On 12/9/2009 at 3:59 PM, in message <4B201DBA.9090704 at gisnet.com>,
Bill Thoen
<bthoen at gisnet.com> wrote:
> Thanks again, Arnd.
> That solution occurred to me this morning, so I'm going to try that
out 
> next. The other acceptable solution would be to open a new pop-up
window 
> and send the output there, but I think the AJAX method will be the 
> better one for what I want it to do.
> 
> Arnd Wippermann wrote:
>> Hi,
>>
>> You cann't insert html to a html document by using a url. There is
nothing
>> like the img tag for pictures.
>> You have to use ajax to request your query. Then you can put the
result with
>> innerHTML to your element. 
>>
>> Arnd 
>>
>> -----Ursprüngliche Nachricht-----
>> Von: mapserver-users-bounces at lists.osgeo.org 
>> [mailto:mapserver-users-bounces at lists.osgeo.org] Im Auftrag von Bill
Thoen
>> Gesendet: Mittwoch, 9. Dezember 2009 00:53
>> An: mapserver-users at lists.osgeo.org 
>> Betreff: [mapserver-users] How do I Control QUERY Output?
>>
>>  From a simple MapServer HTML interface I switch to Query mode and
click on
>> a map feature, and templates I've assigned to the layer fill with
data ...
>> and display in a new page. What I'd like is for the info to display
in a
>> floating div and not disrupt the view by clearing the map just to
display a
>> small window of data. I'd also prefer to not use frames as well.
>>
>> With JavaScript I can make a floating drag-able div box, but I can't
figure
>> out how to get the template to send its table of data to the div. 
>> I've tried removing the HTML header and just appending the table to
the div
>> using innerHTML, but I keep getting null elements or other errors. 
>> Is this approach right and I'm just missing something, or is this
done
>> another way? I spent the better part of an hour today searching for
docs
>> and/or examples, but either it wasn't to be found or my google-fu
was
>> inferior today. Can someone point me to an example or explain how
you can
>> put query output anywhere on the map page?
>>
>> --
>> Bill Thoen
>> GISnet -  www.gisnet.com 
>> 1401 Walnut St., Suite C
>> Boulder, CO 80302
>> 303-786-9961 tel
>> 303-443-4856 fax
>>   
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org 
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the MapServer-users mailing list