[Mapserver-users] "SUM: DHTML Navigation Tools for MapScript"

Hankley, Chip Chip.Hankley at GASAI.Com
Thu Dec 19 16:29:37 EST 2002


I've received a LOT of responses since I posted this question... some
off-line, so I thought it might be a good time to SUM. There are about five
or six folks who were interested in contributing to development.

Apparently a lot of us have been working on DHTML navigation tools... there
are already some fairly refined tools - so there is probably not a need to
re-invent this. Martin Weinelt's and Steve Lime's provide a good
foundation... so we could probably start with their work, and make some
modifications to build a modular 'plug-in' that could be used with MapServer
or MapScript.

A number of people suggested a 'skin' type approach... the idea being to
create a more comprehensive application where all you have to do is supply a
link to a mapfile and it works. While I think these types of apps are great
and worthy of development, it's not really what I'm interested in here. The
best explanation that I can come up with is that I want to develop a DHTML
version of ROSA.  Such a tool could certainly be used as PART of a Skin-type
application, but could be used independently in MapScript (or MapServer)
apps when developers want to create something that is more customized.

I'll try to explain a little better what MY goals for a DHTML navigation
toolset are:

FUNCTIONS
-------------------------
o Click & drag boxes.
  
  User clicks and drags a box on the image. The tool returns 
  the bounding coordinates of the box (in image coordinates).

o Single point click.

  User clicks on the image. The tool returns the coordinates of
  click (in image coordinates).

o Image drag (for panning)

o Mouse move capture (image coordinates) in order to display 
  geo coordinates.

o 'Custom' button.

  When the user clicks the button, some JS code is executed.

o 'Measure' tool.

  User clicks on the image and either:
    a) clicks a second time to identify the 'end' of the 
       measure segment
    b) is allowed to continue 'clicking' to simulate 
       vertices of a measured line segment, with a double
       -click identifying the end of the measure segment.

  Values returned are in image coordinates.

DESIGN PARAMETERS
----------------------------
o A 'tool' will always be associated with an image that functions as a
button.
o A 'tool' will have image swaps for the 'over' and 'click' events
o Implementing a tool should be as simple as possible from the main program
interface... something like this

  <new tool> = createTool(<new tool>, <offImage>, <overImage>, <onImage>, 
               <action type>, <form name>, <form field>, <coord field>);

  example:
  navZoomIn = createTool('navZoomIn', 'ZoomInOff.png', 'ZoomInOver.png',
'ZoomInOn.png',
              'rectangle', 'frmMap', 'CMD', 'COORDS');

  When the user uses this tool, a field called 'CMD' in the form 'frmMap'
will be given 
  the value of 'navZoomIn'. The image coordinates of the drag event will be
placed in 
  the filed 'COORDS'.

  The goal here is to provide kind of a navigation API... so that users can
implement the 
  tools without really having to know what's going on in the background.
They would simply 
  have to make sure that their main program included the references to the
JS files.

o At a minimum, should work in IE 5+, Mozilla 1.01+, or NS 7+. Would be nice
if it worked with other browsers
  (Konqueror, Opera, AOL?).

----------------------------

As I mentioned in my previous post, I have no experience developing
something in a 'team' environment like that... so I have no idea where to
begin. Someone suggested setting up a CVS and mailing list... for those of
you that have done other development, would this project be suitable for
something like that, is it overkill? Do I have to set up my own CVS, or
could we use one of the environments that is already set up for MapServer
development?

Thanks!

Chip



More information about the mapserver-users mailing list