landview application and AJAX

Dylan Beaudette dylan.beaudette at GMAIL.COM
Mon Apr 17 16:47:34 EDT 2006


Thanks for the pointers Steve,

In particular I was curious about the execution order, or a general concept of 
how the Landview application works.

Thanks,

Dylan

On Monday 17 April 2006 12:57 pm, Steve Lime wrote:
> There is a member in the Mapserv object called 'options' that allows you to
> add arbitrary parameters to the URL passed to mapserver. You might try
> something like:
>
>   myMap.options = "&foo=" + foovar;
>
> Where 'foo' is the variable you're passing to MapServer and foovar is the
> javascript variable you filled via ajax/xmlhttp...
>
> Make sense?
>
> Steve
>
> >>> Dylan Beaudette <dylan.beaudette at GMAIL.COM> 4/17/2006 1:19:27 PM >>>
>
> Greetings,
>
> I have been working with the Landview DHTML interface to mapserver, and
> would like to include support for some additional asynchronous interaction
> with a database.
>
> Currently our application works like this:
>
> select a region --> generate URL based on selection --> mapserver
> application with arguments in URL --> interaction with mapserver
> application
>
> I have written some functions in javascript and PHP to perform a spatial
> query on a PostGIS database:
> mapserver application --> calculate extent center coordinates with JS -->
> AJAX style request to PHP function page --> data is returned to mapserver
> page and displayed
>
> this is being done in the postdraw() function found in the landview
> application.
>
>
> I am having trouble figuring out how to pass the results from the above
> function to the creation of the mapserver object such that this value is
> also passed to the mapfile.
>
> In particular, I am curious about when the following line from the landview
> application is executed:
>
> var ms = new Mapserv("main", the_mapfile,  ... );
>
> Any ideas on how to do this?
>
> Thanks!

-- 
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341



More information about the mapserver-users mailing list