This project is read-only.

using shapefile optimization

Mar 22, 2011 at 7:59 PM

Im interested in using the shapefile optimization in the mapwindow 4.8 release, especially the fastmode method. I installed the new MapWinGIS.ocx and loaded it into VS 2010 but I cant find the fastmode method. My question is how can I get this installed correctly so that I can use it in my application? Also, how is it used (example maybe)? Thank you much.

Mar 22, 2011 at 9:40 PM

I suppose the only way to get the new methods is to download binaries from Donwloads->Other available downloads or build them from source.  

In case you are using .NET, interop assemblies are always a question as well. Let me know if further info is needed.

Fast mode usage: Shapefile.FastMode = true;   // that's all ;)



Mar 22, 2011 at 10:36 PM

Here is what I have done so far...

1. regsvr32 /u MapWinGIS.ocx

2. downloaded MapWinGIS-32bit-03-mar-11.rar and replaced the original

3. recieved error during regsvr32 MapWinGIS.ocx

4. downloaded xerces-c_3.dll from

5. regsvr32 MapWinGIS.ocx

6. loaded blank VB .NET project, VS 2010

7. "Add Reference" MapWinGIS Component 4.8

8. Right click toolbox->choose item... added Map Control 4.8

Everything working at this point....

9. Loaded project, converted to VS 2010

10. References to 4.7. removed MapWinGIS and AxMapWinGIS

11. Add Reference to MapWinGIS Components 4.8

12. Build project. caused errors i:

Error    1    Type 'AxMapWinGIS.AxMap' is not defined.    C:\Users\deadpickle\Desktop\GRRUVI2\GRRUVI2\Form1.Designer.vb    33    25    GRRUVI2

13. View Designer had error. Ignore and continue

14. added map control to form cause huge error. Saved and closed project

15. Reopened project. showed a Designer error. Rebuild then Build project fixed this error

Long process to get an old project updated but now theres a list on how I did it. Thanks for the help.

One other question though... What are some other ways to speed up the drawing of shapefiles? Im trying to display several large ones :)

Mar 24, 2011 at 7:50 PM

Thanks for the help, I really dig this application!

I have a question on how the VisibilityExpression works for shapefiles. Could you give an example?

Mar 25, 2011 at 2:20 PM

You can set visibility expression like this: 

Shapefile.VisibilityExpression = "[Area] > 100 and [Population] > 5000";

It is assumed of course that there are [Area] and [Population] fields in the shapefile.

There are separate visibility expressions for labels and charts.