[mapguide-users] DWF Layer problems (slow loading DWF and duplicate layer names)

Bob Cassarly bob.cassarly at famis.com
Sun Dec 21 19:15:42 EST 2008


I am using DWF files as "background" layer for my maps.
I plot the files from AutoCAD Map 3D and "Include Layer Information"
I use the "Layer Filter" feature to display only the layers from the DWF
that I specify.

When I plot the DWF from Map 3D 2007 the DWF is plotted fine.  It looks
great, is pretty fast and contains somehere in the neigborhood of 100
layers.

When I plot the DWF from Map 3D 2008 or 2009 the file size of the DWF
increases by about 50% and contains over 28,000 layers most of which are
duplicates (i.e. layer 0 is duplicated 4000 times).  The file takes about
200x time longer to load in MapGuide.  

If I do not include layer information the 2008/2009 DWF file loads in
MapGuide in about the same abmount of time that the 2007 version of the file
does.

I inspected the W2D file in the DWF and found that the 2007 DWF contains the
layer name (with a number) only once.  Each element that occurs on that
layer references the layer number not the layer name (which makes sense to
me).  

For each element in the 2008, 2009 DWF W2D file the layer name and a number
was included (eg layer "0" had numbers 11, 24, 56, 3434, 5344 etc).  I
assume this is why the layers are duplicating in MapGuide.

FYI: You can see this result in one of two ways after plotting a file to a
DWF (remember to include layer information).
1. Load the DWF into MapGuide Studio and click on the "Include only these
layers" button. (you will see that a 2008, 2009 DWF will have duplicate
layers)
2. Use the MapGuide Server DrawingService EnumerateLayers and count the
layers (following is a PHP code snippet to do this)

$graphicsSource= 'Library://DWFs/MyDWF.DrawingSource';
$drawingService =
$siteConnection->CreateService(MgServiceType::DrawingService);
$drawingId = new MgResourceIdentifier($graphicsSource);
$byteReader = $drawingService->EnumerateSections($drawingId);
$layerCollection = $drawingService->EnumerateLayers($drawingId, "Model");
echo  $layerCollection->GetCount();

This appears to be a bug with the DWF plotter/publisher in Map 3D 2008/2009
has anyone else seen this.  Is there a work around or perhaps an AutoCAD
setting that I am missing?

Thanks
-- 
View this message in context: http://www.nabble.com/DWF-Layer-problems-%28slow-loading-DWF-and-duplicate-layer-names%29-tp21120938p21120938.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list