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

2009-12-11 Thread Bill Thoen

Steve Lime wrote:

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
  


Your example above is tantalizing. What it shows with the Identify tool 
is just what I'm trying to learn how to do, but it contains a lot of 
inter-twingled code from multiple libraries, and I can't seem to open 
and read all the files, so it's a bit beyond my reach.


I know how AJAX works, and I was able to get close by putting an AJAX 
call in the template file called by my layer and reading the XML file 
generated in the template file after a click in Query mode, but that 
approach just doesn't seem right. Too kludgey.


In the AJAX method you mention above, where do you intercept the 
normal mapfile sequence from the mouse-click to the layer's call to the 
template, to the final map redraw? Do you even use a template file to 
resolve variables, or do you get those some other way? Is there a 
simpler demo out there that demonstrates the technique? I'm sure this is 
simpler than I think, but I just don't see it yet.


Any suggestions for the thick-headed?

--
- Bill Thoen 
 GISnet - www.gisnet.com

 303-786-9961

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-12-09 Thread Arnd Wippermann
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-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Bill Thoen
Gesendet: Mittwoch, 9. Dezember 2009 00:53
An: mapserver-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-12-09 Thread Bill Thoen

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-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Bill Thoen
Gesendet: Mittwoch, 9. Dezember 2009 00:53
An: mapserver-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-12-09 Thread Steve Lime
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.9090...@gisnet.com,
Bill Thoen
bth...@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-boun...@lists.osgeo.org 
 [mailto:mapserver-users-boun...@lists.osgeo.org] Im Auftrag von Bill
Thoen
 Gesendet: Mittwoch, 9. Dezember 2009 00:53
 An: mapserver-users@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@lists.osgeo.org 
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


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

2009-12-08 Thread Bill Thoen
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users