Post is pinned.Post has attachment
I've just published MapWindow5 v5.3.0.
Get it at


We are currently trying to capture edit events in our plugin, which works fine for shapes that are added, but for some reason, when we delete shapes, the BeforeShapeEdit and AfterShapeEdit events do not get triggered

Any pointers on how we can tackle this? We can listen to feature count changed - but then for deleting we no longer have access to the deleted feature...

i need some help with mapwingis! i will try connect to sql server 2008. but i can not do it. Please help me!
thanks all!
string connectionString = "MSSQL:server=" + tbserver.Text + ";database=" + tbdatabase.Text + ";trusted_connection=no;uid=" + textBox3.Text + ";pwd=" + textBox4.Text + "";

var ds = new OgrDatasource();
var layer = new OgrLayer();
if (layer.FeatureCount == 0)
MessageBox.Show("no ");
MessageBox.Show("have layers");

catch (Exception ex)

Post has attachment
I am not a developer, just an enthusiastic user of MapWindows - Thank you for a great open source GIS! I was wondering if the DocumentLauncher plugin from v4.x ( is available yet in v5.x and if not, are there are any plans to add it?
Thank you

I am having issues creating new features in a MSSQLSpatial database layer.

The layer loads fine, I can update attributes, move geometry etc. only adding new features fails. Even after removing all fields except the ID and geometry fields.
The error I get in the DEBUG window isn't very helpful: "Failed to save OGR layer changes" but no information about why it failed.

I ran a trace on my database to see what is happening and I get no errors at all - I even see a successful query executed to insert the geometry:
exec sp_executesql N'INSERT INTO [dbo].[TEST] ([Geometry]) VALUES (geometry::STGeomFromWKB(@P1,0).MakeValid());',N'@P1 image',0x010100000096687DFC3F7FF140D945370028730B41
but after that a second batch is run that deletes the newly created entry!

The FID gets set to -1 - which is ok. But somehow, that ID does not get updated after inserting it, causing the feature to be deleted again?

I am struggling with a spatial query and would appreciate any help pointing me in the right direction. I am currently using SelectByShapefile to find out which of my asset point items intersect with a road network shapefile (my definition shapefile). This is working fine but for each of those asset point items I would then like to get an attribute from the definition shapefile which I don't know how to do.

If _AssetsShp.SelectByShapefile(_BufferShp, tkSpatialRelation.srIntersects, False, _AssetShpIndices) Then
If Not _AssetShpIndices Is Nothing Then
'//Add the selected assets to list
For Each ShpIndex As Integer In _AssetShpIndices

_AssetsOnSelectedNetwork.Add(New Asset(EA_Conn) With {
.FeatureCode = _AssetsShp.CellValue(0, ShpIndex),
'**ADD here an attribute from definitionshapefile e.g. .NetworkAttr = [some attribute from buffershp]
End If
End If


I would like to know about GPS code or any other GPS Plugin for Mapwindow. I tried and search since a month on web but still not found any code even tired and planning to purchase GPS Tool code for my mapwindow. If anyone can help share link or code or plugin web address will be appreciated.

Post has attachment
How can I change http://Mainview.cs design?
Do not show in VS2017
My error in folder view in soultion exp :
at MW5.UI.Forms.MapWindowView..ctor() in C:\dev\MapWindow5-develop\MapWindow5-develop\src\MW5.UI\Forms\MapWindowView.cs:line 21
project compile in debug x86 is ok
Installation project by video

please help

MapWinGIS.Shapefile shapefile2 = new MapWinGIS.Shapefile();

shapefile2.Open(@"E:\bj_shp\区县_point.shp", null);
int intHandler2 = axMap1.AddLayer(shapefile2, true);

MapWinGIS.Labels lbl = shapefile2.Labels;
shapefile2.Labels.Generate("[NAME]", MapWinGIS.tkLabelPositioning.lpInteriorPoint, false);
shapefile2.Labels.FrameVisible = false;
shapefile2.Labels.FontColor = (uint)ColorTranslator.ToOle(Color.DarkViolet);

[NAME]The field is Chinese, and it is garbled. I have tried various coding conversions and still can't solve the problem.
Do you know what to do?
Development Linguistics C#

Post has attachment
Wait while more posts are being loaded