[mapserver-users] mapplet without complete refresh

Stephen Lime steve.lime at dnr.state.mn.us
Tue Aug 7 13:25:49 EDT 2001


Actually the client must handle all aspects of the coordinate calculations, including
box fitting. Basically you want to hand a "perfect" url off to the mapping engine so
that no adjustment is necessary. I've got a couple examples running:

  http://maps.dnr.state.mn.us/landview 
  http://maps.dnr.state.mn.us/compass/view_java.html 

Both of these use the mapplet and a javascript library I wrote to do the coordinate
management and so on. View and save the source in Netscape of either of the
above applications to study how this is done. The javascript and java code can
be nabbed at:

  http://maps.dnr.state.mn.us/javascript 
  http://maps.dnr.state.mn.us/java/mapplet 

The core code is straight forward, it's making pan/zoom/info buttons behave that
make things messy. There is no howto for this, not yet anyway (authors?) but I'd be
glad to answer specific questions.

Steve

Stephen Lime
Internet Applications Analyst

Minnesota DNR
500 Lafayette Road
St. Paul, MN 55155
651-297-2937

>>> "Kralidis, Tom" <Tom.Kralidis at CCRS.NRCan.gc.ca> 08/03/01 10:00AM >>>
Armin,

Using the mapplet's swap() method will do this.  However, you must control
the coordinate calculations on the client (i.e. JavaScript), as well as
other applicable MapServer variables.

MapServer's CGI version handles these issues (irregular bounding box fitting
to mapwidth/mapheight, etc.).

I believe Steve has an application which does this in the Gallery section of
the MapServer website, called "LandView", however it's quite a job to
implement it.  Perhaps a HOWTO document idea?

Has anyone else got hints?

Thanks

..Tom

=================================
Tom Kralidis
Systems Scientist
Canada Centre for Remote Sensing
Tel: (613) 947-1828
http://www.ccrs.nrcan.gc.ca/ 
=================================

> -----Original Message-----
> From: Armin Burger [mailto:armin.burger at territoriumonline.com] 
> Sent: Friday, August 03, 2001 8:58 AM
> To: mapserver-users at lists.gis.umn.edu 
> Subject: [mapserver-users] mapplet without complete refresh
> 
> 
> In the mail archive I found in a posting that it should be 
> possible to use
> the mapplet and avoid a complete refresh of the entire page. 
> Only the applet
> contents should be updated by zoom actions etc. This should 
> be done with
> some JavaScript functions. Can anybody tell me how to do 
> this? Is there an
> example in the gallery collection?
> 
> My problem is that I want to change parameters like 'mode' or 
> 'zoomdir' via
> JavaScript (with buttons), and with every complete refresh 
> these parameters
> are reset to their default values. Maybe there's also another solution
> writing always back the current parameter settings to the 
> refreshed page. I
> assume it could be done with some dummy html page containing 
> all necessary
> form parameters that will be read and written into the 
> refreshed page via
> javascript. Is this approach feasible?
> 
> It could probably also be done with frames but I'd prefer a 
> solution without
> them.
> 
> Thanks for any hints.
> 
> Armin
> 
> --
> Armin Burger
> Territorium Online
> Siemensstrasse/Via Siemens 19 - 39100 Bozen/Bolzano - Italia
> _
> 




More information about the mapserver-users mailing list