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: 

Disconnected MWF Files

11 REPLIES 11
Reply
Message 1 of 12
Anonymous
436 Views, 11 Replies

Disconnected MWF Files

Anyone have any experience with this?

I have a web application which loads a map with dynamic layers pulling from an isapi data source. I would like to give the user the option to save the mwf file to their local drive and allow them to open the file in the viewer. The one thing is that the users need to be able to open the mwf files while disconnected (laptop in the field). And this has to be done all programmatically, behind the scenes.

I tried messing around with the DAT, and although I can convert from MWF to MWX, edit, convert back and such, I can't seem to keep it from wanting to connect.

Any suggestions?

Thanks,
Robert
11 REPLIES 11
Message 2 of 12
Anonymous
in reply to: Anonymous

On Wed, 21 Sep 2005 14:12:04 -0700, RobertMGE wrote:

> I have a web application which loads a map with dynamic layers pulling
> from an isapi data source. I would like to give the user the option to
> save the mwf file to their local drive and allow them to open the file
> in the viewer. The one thing is that the users need to be able to open
> the mwf files while disconnected (laptop in the field). And this has to
> be done all programmatically, behind the scenes.
>
> Any suggestions?

Make all the layers static, rather than dynamic.

--
James Card
Message 3 of 12
Anonymous
in reply to: Anonymous

I did that by editing the xml prior to converting the mwx back to an mwf, by setting the static flags to '1'. However, it does not import any of the dynamic layers at that point, and still requires a connection to the data source in order to properly display the layer.

I guess my question, reworded, would be: Is there any way, using the DAT, to convert a dynamic mwf to a static mwf which imports all of the applicable layer data, with no user interaction aside from clicking one button?
Message 4 of 12
Anonymous
in reply to: Anonymous

I think in order to get the static layer information saved into the MWF, you
must open and save it in Author.

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

wrote in message news:4964081@discussion.autodesk.com...
I did that by editing the xml prior to converting the mwx back to an mwf, by
setting the static flags to '1'. However, it does not import any of the
dynamic layers at that point, and still requires a connection to the data
source in order to properly display the layer.

I guess my question, reworded, would be: Is there any way, using the DAT, to
convert a dynamic mwf to a static mwf which imports all of the applicable
layer data, with no user interaction aside from clicking one button?
Message 5 of 12
Scott Friedrich
in reply to: Anonymous

There's no data in the MWF to represent the StaticLayerDataStream. If you change the Static property to 0 and open it in Author it will then create this node. The HELP indicates you can not change from Dynamic to Static.

One workaround - store pre-defined StaticLayerDataStream values in a database table. That way, when the user saves an MWF you can query the map to see what layers they want. Then query the DB and get the StaticLayerDataStream value to append to the XML before you save it. This is kinda hoakey because everytime you edit a layer you have to re-create the StaticLayerDataStream value in the db.

Scott
Message 6 of 12
Anonymous
in reply to: Anonymous

Have you seen any documentation on the format of this value? I created a static mwf in Author, then changed it to an mwx using the DAT component. I'm seeing the node you are referring to, but am not sure how I'd go about modifying it.

Is there any way to pull that data out of a dynamic mwf?

What if I were to parse through the mwx file on the server and individually grab the data from the different layers. Any way to get that StaticLayerDataStream on a layer by layer basis?
Message 7 of 12
Scott Friedrich
in reply to: Anonymous

I've only tested this idea with storing the datastream for symbols in a database and it works fine. What you need to do is manually create the mwx in Author as Static layers. Open it up in a text ediotr - or parse with an XML Parser on that node - retrieve the value of the node as text. Store the value as text in the database.

Then when you need the layer to be static, change the static value to 0 and add the StaticLayerDataStream node, using the stored text as it's value.

Scott
Message 8 of 12
Scott Friedrich
in reply to: Anonymous

After thinking about this....yes, you can have a seperate .MWX file residing on the server that has all the Static Data defined. You're routine to provide a MWF with static layers could then be achieved.

1) Query current MWF to get a list of layers present in MWF to be saved as static.

2) Postback to server the layer list.

3) With DAT - create new MWX, copy (parse) the layer info from the predefined Static MWX to your new MWX. Save it as an MWF on the server and provide a link to the user to download the MWF. Once the dload is complete delete the MWF on the server.

In theory that should work. But again, everytime you make edits to the layers you have to re-create the predefined MWX to update the static data.


Scott
Message 9 of 12
Anonymous
in reply to: Anonymous

I see where you are going with this. Unfortunately, this is going to be used by quite a few people, none of which will have the ability to generate a 'new' static mwf/mwx file. None of my users will have Author. They will be making their changes through a custom MapGuide interface, and the changes are expected to be reflected immediately to anyone who would open/download the map.
Message 10 of 12
Anonymous
in reply to: Anonymous

Hi Robert,

Instead of breaking your head on a feature MapGuide doesn't provide, use DWF
for offline drawings/maps.

Download the Autodesk DWF Toolkit and use that on the server to extract the
map data and write DWF on the fly which the users can have in their offline
webbrowser.

You then just have to use some script to detect if the server is available
and if not switch to client page with a DWF viewer instead of the online MG
browser.

I would atleast investigate that option, keep us posted.

Best regards,
Jocke

wrote in message news:4964630@discussion.autodesk.com...
I see where you are going with this. Unfortunately, this is going to be
used by quite a few people, none of which will have the ability to generate
a 'new' static mwf/mwx file. None of my users will have Author. They will
be making their changes through a custom MapGuide interface, and the changes
are expected to be reflected immediately to anyone who would open/download
the map.
Message 11 of 12
Anonymous
in reply to: Anonymous

please help me about .mwf files
How can we cerate .mwf file.
i seared on net bt this hard to understand me.
i am using india.sdf file.bt i unable to connect it with my html +jsp coding.
'object not found' error is there
im new in mapguide using mapguide studio, mapguide server on win server 2003.
which type of softwares , database coonectivities are required for a complete map display on ie browser. plz tell me in detail
plz help me.
many thanks Message was edited by: Reshma
Message 12 of 12
Anonymous
in reply to: Anonymous

MWF files are only used in the older Autodesk MapGuide series, not in the newer Autodesk MapGuide Enterprise or MapGuide OpenSource series.

I recommend ignoring any dicussion about MWF, MWX and MLF files because they are from the older MapGuide and, if not already considered obsolete by the release of the MapGuide Enterprise, they will be obsoleted. The Dynamic Authoring Toolkit (DAT) and the SDF COM Toolkit are also technologies related to the old MapGuide software and can be ignored as well.

You should check the MapGuide Enterprise forums. They are linked in http://discussion.autodesk.com/index2.jspa?categoryID=23

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

Post to forums  

Autodesk Design & Make Report