Map Loading Speed Issue

Hi all. I have an application that loads roughly 6,000 shapes on 27 shapefiles (and will only grow as days go by). The problem is that this process takes over 2 minutes to load. I know that doesn’t sound like much to most, but time is of great value in this application. Does anyone have any tips on how to efficiently load a map? Thank you!

Hello again. I tried saving my mapstate and then loading it. I can save it with no issues, but when i go to load it MS Access crashes. my code is below. i’ve tried forms, reports, and textboxes for the callback object with the same result. can anyone help?

Dim cb As Object
Set cb = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
strpath = "{path}\mapcallback.txt"
Set oFile = cb.CreateTextFile(strpath)
pt = "{path}\currentmapstate"
DoCmd.OpenForm "Map"
With Forms!Map.Map0
lms = .LoadMapState(pt, cb)
End With

I got the mapstate to save correctly (.dbf). still can’t open it though

Below is the dbf file if that helps anyone???

<MapWinGIS OcxVersion="5.2.4.0" FileType="MapState" FileVersion="2" FilenamesEncoding="utf8">
  <MapState SendSelectBoxFinal="1" CursorMode="10" TrapRightMouseDown="1" IdentifierColor="255" Projection="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs" ExtentsLeft="-13830256.433494" ExtentsRight="-7509831.438649" ExtentsBottom="2715955.246519" ExtentsTop="6492555.940033" ExtentsPad="0.020000" />
  <Layers>
    <Layer LayerType="Shapefile" LayerName="" LayerVisible="1" LayerKey="" MaxVisibleZoom="20" Filename="">
      <ShapefileClass ShpType="1">
        <DefaultDrawingOptions LineColor="9868950" PointNumSides="5" PointShapeType="2" PointSize="10.000000" Rotation="18.000000" RotationExpression="" />
        <ShapefileCategoriesClass ClassificationField="-1" />
        <LabelsClass Alignment="5" Generated="0" TextRenderingHint="3" />
        <ChartsClass />
        <TableClass>
          <Fields />
        </TableClass>
      </ShapefileClass>
    </Layer>
    <Layer LayerType="Shapefile" LayerName="" LayerVisible="1" LayerKey="" MaxVisibleZoom="20" Filename="">
      <ShapefileClass ShpType="1">
        <DefaultDrawingOptions FillColor="42495" LineColor="9868950" PointNumSides="5" PointShapeType="2" PointSize="10.000000" Rotation="18.000000" RotationExpression="" />
        <ShapefileCategoriesClass ClassificationField="-1" />
        <LabelsClass Alignment="5" Generated="0" TextRenderingHint="3" />
        <ChartsClass />
        <TableClass>
          <Fields />
        </TableClass>
      </ShapefileClass>
    </Layer>
    <Layer LayerType="Shapefile" LayerName="" LayerVisible="1" LayerKey="" MaxVisibleZoom="20" Filename="">
      <ShapefileClass ShpType="1">
        <DefaultDrawingOptions FillColor="13382297" LineColor="9868950" PointNumSides="5" PointShapeType="2" PointSize="10.000000" Rotation="18.000000" RotationExpression="" />
        <ShapefileCategoriesClass ClassificationField="-1" />
        <LabelsClass Alignment="5" Generated="0" TextRenderingHint="3" />
        <ChartsClass />
        <TableClass>
          <Fields />
        </TableClass>
      </ShapefileClass>
    </Layer>
    <Layer LayerType="Shapefile" LayerName="" LayerVisible="1" LayerKey="" MaxVisibleZoom="20" Filename="">
      <ShapefileClass ShpType="1">
        <DefaultDrawingOptions FillColor="13882323" LineColor="9868950" PointNumSides="5" PointShapeType="2" PointSize="10.000000" Rotation="18.000000" RotationExpression="" />
        <ShapefileCategoriesClass ClassificationField="-1" />
        <LabelsClass Alignment="5" Generated="0" TextRenderingHint="3" />
        <ChartsClass />
        <TableClass>
          <Fields />
        </TableClass>
      </ShapefileClass>
    </Layer>
  </Layers>
  <Tiles DoDiskCaching="1" DiskCacheFilename="C:\Program Files\Microsoft Office\Root\Office16\mwtiles.db3">
    <TileProviders />
  </Tiles>
  <Measuring />
  <ShapeEditor />
</MapWinGIS>

Since there are a bunch of views… I solved this by saving shapfiles to disk and loading them. Pretty simple solution :zipper_mouth_face:

1 Like