Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Usint the DAT.writeToMwfStream() with coldfusion.

4 REPLIES 4
Reply
Message 1 of 5
jebu23
305 Views, 4 Replies

Usint the DAT.writeToMwfStream() with coldfusion.

Does anybody out there use the DAT with coldfusion? I've been able to create a temporary mwf file which is delivered via but I would really like to return the mwf as a stream. Not sure how to do this...can anybody help????

Thanks!
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: jebu23

Hello,

I'm not sure what you are asking for. If you already are using the
tag to deliver the mwf then you are streaming it to the user.
What is the functionality you are trying to develop?

Are you perhaps wondering if there is a way to stream it to the user without
having to save the file to the server's filesystem first? With Coldfusion
this is not possible (at least not as of version 5.0). It was a big
complaint among developers, but there is no simple workaround without using
a third party tool.

Navid


"jebu23" wrote in message
news:f1a4f94.-1@WebX.maYIadrTaRb...
Does anybody out there use the DAT with coldfusion? I've been able to create
a temporary mwf file which is delivered via but I would really
like to return the mwf as a stream. Not sure how to do this...can anybody
help????
Thanks!
Message 3 of 5
jebu23
in reply to: jebu23

Thanks Navid??

That was exactly what I was looking for. I've been able to deliver the map but as you said, I had to save it to the file system first.

I can't imagine how many countless hours I could have spent trying to track that one down!! Thank you!!

I'm wondering though...I just got back from Autodesk University where I took a class from Gorden Luckett on customizing mapguide useing the Dynamic Authoring Toolkit. I asked about useing the WriteToMwfStream() method and he indicated that it was possible although he didn't have any code to demonstrate...

Well, thanks again!!

Jade
Message 4 of 5
Anonymous
in reply to: jebu23

Take a look at Example 2 in the Dynamic Authoring
Toolkit Examples directory.  The main map file (map.htm) just uses a
standard map embed statement as follows:

 

<object ID="map" WIDTH="100%"
HEIGHT="100%"
   
CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"
   
CODEBASE=
 "
href="ftp://adeskftp.autodesk.com/webpub/mapguide/ver6/viewer/en/mgaxctrl.cab">ftp://adeskftp.autod...
">
   
<param name="URL" value="basemap.asp">
    <embed
src="basemap.asp" Name="map" width="100%"
height="100%"
 pluginspage=
 "
href="ftp://adeskftp.autodesk.com/webpub/mapguide/ver6/viewer/en/mp60.exe">ftp://adeskftp.autodesk....
">
</object>

 

Note that the embed is actually executing the
basemap.asp who's code ends with the following:

 

' Return the binary MWF
information
Response.Expires = -1
Response.Buffer =
TRUE
Response.ContentType =
"application/x-mwf"
Response.BinaryWrite(mwfDoc.WriteToMwfStream())

Response.End

 

No MWF is ever written to the file system in this
case.  Pretty slick.

 


--
Andy Morsell, P.E.
Spatial
Integrators, Inc.

href="http://www.spatialgis.com">http://www.spatialgis.com




style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">Thanks
Navid??

That was exactly what I was looking for. I've been able to deliver the map
but as you said, I had to save it to the file system first.

I can't imagine how many countless hours I could have spent trying to track
that one down!! Thank you!!

I'm wondering though...I just got back from Autodesk University where I
took a class from Gorden Luckett on customizing mapguide useing the Dynamic
Authoring Toolkit. I asked about useing the WriteToMwfStream() method and he
indicated that it was possible although he didn't have any code to
demonstrate...

Well, thanks again!!

Jade

Message 5 of 5
Anonymous
in reply to: jebu23

Yes, that's a great example of how it should be done. Unfortunately
Coldfusion doesn't support sending this stream directly to the user's
browser without first saving the stream to a temporary file, which is
possible in other environments such as ASP and ASP.NET among others. This
is unfortunate because writing to the disk upon each map creation is not a
great solution and would be somewhat of a wear upon the hard drive over
time.

Navid
"Andy Morsell" wrote in message
news:47171F4883A73CC54914B136FB7D5D8A@in.WebX.maYIadrTaRb...
Take a look at Example 2 in the Dynamic Authoring Toolkit Examples
directory. The main map file (map.htm) just uses a standard map embed
statement as follows:


CLASSID="CLSID:62789780-B744-11D0-986B-00609731A21D"
CODEBASE=
"ftp://adeskftp.autodesk.com/webpub/mapguide/ver6/viewer/en/mgaxctrl.cab">


pluginspage=
"ftp://adeskftp.autodesk.com/webpub/mapguide/ver6/viewer/en/mp60.exe">


Note that the embed is actually executing the basemap.asp who's code ends
with the following:

' Return the binary MWF information
Response.Expires = -1
Response.Buffer = TRUE
Response.ContentType = "application/x-mwf"
Response.BinaryWrite(mwfDoc.WriteToMwfStream())
Response.End

No MWF is ever written to the file system in this case. Pretty slick.


--
Andy Morsell, P.E.
Spatial Integrators, Inc.
http://www.spatialgis.com

"jebu23" wrote in message
news:f1a4f94.1@WebX.maYIadrTaRb...
Thanks Navid??
That was exactly what I was looking for. I've been able to deliver the map
but as you said, I had to save it to the file system first.
I can't imagine how many countless hours I could have spent trying to track
that one down!! Thank you!!
I'm wondering though...I just got back from Autodesk University where I took
a class from Gorden Luckett on customizing mapguide useing the Dynamic
Authoring Toolkit. I asked about useing the WriteToMwfStream() method and he
indicated that it was possible although he didn't have any code to
demonstrate...
Well, thanks again!!
Jade

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report