MapServer with Cold Fusion?

Doyon, Jean-Francois Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Thu Feb 22 08:40:30 PST 2001


David,

You CANNOT use MapServer with ColdFusion in the same way that you would with
PHP or Perl.

If you NEED to have a ColdFusion page with a mapserver tool, here is what I
suggest:

Setup a seperate mapserver (CGI Version) Somewhere. Create a mapfile and so
on to suit your needs.
Also, create a template that ONLY returns a fully qualified URL to the
temporary image.

THEN, from CF, all you have to do is use CFHTTPGET to send a query to the
mapserver, with all appropriate parameters.  MapServer will generate the
map, and return the world accessible URL to reach it.  You can then use this
URL to embed it into your HTML output, and the webbrowser will fetch the map
from the said server (Could be the same box, or half way accross the world).

Using the flexibility of the CGI parameters and the really great system that
allows you to set almost any mapfile parameter from the URL, you can do
pretty much anything remotely, assuming the data you want is available on
the said server of course.

This basically turns MapServer into a OGC WMT like server, only with a
completely non-standard Web API :) (Which is actually much more powerfull
than the WMT in many ways).

You can achieve this functionality with any server side scripting language
that can do HTTP GET's, such as Perl, PHP, ASP, ColdFusion, and probably
more.

I'm sending this to the list, they might find this handy as well.

Looks like paul at tei.or.th is looking into a MapServer for CF using WDDX ?.
This stuff is a bit over my head, but it would definitely be very cool, and
make it (MapServer) even more accessible to the masses.

Cheers,
J.F.

> ----------
> From: 	Fawcett, David[SMTP:david.fawcett at moea.state.mn.us]
> Sent: 	Thursday, February 22, 2001 10:43 AM
> To: 	'Doyon, Jean-Francois'; 'paul at tei.or.th'
> Subject: 	RE: MapServer with Cold Fusion?
> 
> Jean Francois and Paul, 
> 
> From JF's message, I get the impression that if you use MapServer with
> Cold Fusion, it will work, but you are not able to take advantage of any
> of the CF features, like reading the CF variables.
> 
> After Paul's message, it sounds like a MapServer app will likely crash or
> crash the CF server when run.  Could either of you clarify for me?
> Experience / examples?
> 
> Would it work if you built a standard html MapServer app (still on the
> same server), and just hit it from a link on a CF page?  I will probably
> run some tests soon, but we don't have a test server, and our only server
> with CF on it is our live Web server.  I really don't want to crash that!
> 
> Thanks, 
> 
> David.
> 
> David J. Fawcett
> GIS / Databases
> 
> MN Office of Environmental Assistance
> 520 Lafayette Rd N
> St. Paul, MN 55155
> 651.215.0200
> 
> 
> > ----------
> > From: 	Doyon,
> Jean-Francois[SMTP:Jean-Francois.Doyon at CCRS.NRCan.gc.ca]
> > Sent: 	Wednesday, February 21, 2001 4:23 PM
> > To: 	mapserver-users at lists.gis.umn.edu; 'Fawcett, David'
> > Subject: 	RE: MapServer with Cold Fusion?
> > 
> > Hmmmm I've thought of that myself.
> > 
> > Unfortunately right now MapServer isn't ported to CF, so there would be
> no
> > direct link between your ColdFusion code, and the MapServer engine.
> > 
> > There are a variety of tricks to make it happen though, such as using
> > CFHTTPGET to query a remote MapServer and seemlessly incorporate the
> > resulting gif into your CF page.  This very cool technique works with a
> lot
> > of languages too, and almost creates a form of "API", we use it to
> provide
> > MapServer served maps to clients who create the pages and content, and
> > simply embed our maps into their own pages.
> > 
> > Although a CFX version of MapServer would be very cool indeed :) Anybody
> ?
> > 
> > J.F.
> > 
> > > ----------
> > > From: 	Fawcett, David[SMTP:david.fawcett at moea.state.mn.us]
> > > Sent: 	Wednesday, February 21, 2001 3:43 PM
> > > To: 	mapserver-users at lists.gis.umn.edu
> > > Subject: 	MapServer with Cold Fusion?
> > > 
> > > I would also be interested to know if anyone has run MapServer apps in
> > > conjunction with Cold Fusion.  Can anyone see any potential problems?
> > > 
> > > David J. Fawcett
> > > GIS / Databases
> > > 
> > > MN Office of Environmental Assistance
> > > 520 Lafayette Rd N
> > > St. Paul, MN 55155
> > > 651.215.0200
> > > 
> > 
> 



More information about the MapServer-users mailing list