Post is pinned.Post has attachment
I've just published MapWindow5 v5.3.0.
Get it at https://github.com/MapWindow/MapWindow5/releases

Hello!

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();
try
{
ds.Open(connectionString);
var layer = new OgrLayer();
if (layer.FeatureCount == 0)
{
MessageBox.Show("no ");
}
else
{
MessageBox.Show("have layers");
}

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

Post has attachment
Hello,
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 (https://earljon.wordpress.com/2008/04/11/gismapwindow-45-enhancing-document-launcher-plugin/) 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!
DELETE FROM [dbo].[TEST] WHERE [FID] = 21

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?

Hi,
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]
})
Next
End If
End If

Thanks,
Tom

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
Hi
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
https://youtu.be/WVQaFsil0bY

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
wis-4-34-04
wis-4-34-04
dokumen.tips
Wait while more posts are being loaded