ActiveX version of Mapserver

Stephen Lime steve.lime at dnr.state.mn.us
Mon Jul 12 16:07:30 EDT 1999


Here's what I've got going so far, objects and methods. There are too many object members
to list, so I won't. My goal is to allow read/write access to everything. For most things this is
real simple, but things like arrays (char ** for projection args) are tedious. Anyway here are
the supported objects:

  object: map
     methods: new
                    getExtent
                    setExtent
                    getLayer
                    addLayer
                    addColor
                    getProjection
                    setProjection
                    draw
                    drawScalebar
                    drawLegend
                    and so on...

  object: layer
    methods: draw
                    getClass
                    addClass
                    getQuery
                    addQuery
                    getProjection
                    setProjection

The methods are only for non-standard C datatypes so most things can be changed simply
using Perls object oriented notation. For example, here's a code snippet to change the
status of a scalebar:

  $map = new mapObj("foo.map");
  $map->{scalebar}->{status} = MS_TRUE;

Here's a snippet to turn each layer on:

  $map = new mapObj("foo.map");
  for($i=0; $i < $map->{nLayers}; $i++) {
    $layer = $map->getLayer($i);
    $layer->{status} = MS_ON;
  }
  
In addition to the objects users are used to seeing in mapfiles (eg. legends, layers...) there
are some spatial data primitives for points, lines and polygons. Each object type will have
a constructor, some population methods (eg. $line->addPoint($x, $y) or $poly->addLine($line)),
and a draw method ($poly->draw($map)). These constructs will be especially usefull as you'll
be able to populate them from a number of sources (eg. oracle or text files). Then you can 
sandwich them between traditional shapefile or raster layers.

There also will be an object and methods associated with queries results but I haven't gotten
that far yet.

The goal, at least of the mapping piece is an image object that most likely would be saved as
an GIF image. This datatype is also used by several other perl modules so even more custom
annotation possiblities exist. For example, one could process a request that generates a map
and a query against some database. Query results could be graphed and imbeded in the map
using the GD.pm module. Does this help?

Steve

Stephen Lime
Internet Applications Analyst
MIS Bureau - MN DNR

(651) 297-2937
steve.lime at dnr.state.mn.us

>>> <imap at chesapeake.net> 07/12 2:16 PM >>>

About this ActiveX version... Are we talking about
setting up COM (Component Object Model) for mapserv?
I think that MapScript may be for the benefit of
perl users, but the object access part of Steve's
MapScript design may be extensible in the Microsoft
world.   Steve, can you give us a heads-up about the
construction of Mapscript (components/structures/
objects/access/etc) to get some ideas?  I'd like to
see the ActiveX component evolve with the same 
idea as MapScript.  It should be very similar one would
hope.

Thanks,

-Chris (imap at chesapeake.net)
  


Brent Fraser wrote:
> 
> ----- Original Message -----
> From: Brent Fraser <bfraser at geoanalytic.com>
> To: Banister Trevor <TBanister at SpaceImaging.com>
> Sent: Monday, July 12, 1999 10:58 AM
> Subject: Re: ActiveX version of Mapserver
> 
> > I've done some work along the ASP line.  I've only implemented
> > a few functions, mostly for reading and writing the members
> > of the map and layer structures.  I've put further ASP work on
> > hold until I see what Steve comes up with MapScript (and I'm
> > busy working thru a bug in setting map extents with ASP)
> >
> > If you want some more details, let me know...
> >
> > Brent Fraser
> >
> > ----- Original Message -----
> > From: Banister Trevor <TBanister at SpaceImaging.com>
> > To: <mapserver-users at lists.gis.umn.edu>
> > Sent: Monday, July 12, 1999 10:35 AM
> > Subject: ActiveX version of Mapserver
> >
> >
> > > I've heard rumors about someone compiling Mapserver as an ActiveX ASP
> > > component. I've thought of doing this myself, but if someone has already
> > > done a port I won't re-invent the wheel. Does anyone know of such an
> > effort,
> > > and if the code or binary is available?
> > >
> > > Thanks.
> > >
> > > Trevor Banister
> > >
> >



More information about the mapserver-users mailing list