MapToolBar

Topics: WinForms Controls
Aug 8, 2007 at 5:26 PM
I created a control that contains buttons for the different ActiveTool options of the MapBox. Multiple MapBox objects can be linked to this control.

Patch ID 194: http://www.codeplex.com/SharpMap/SourceControl/PatchList.aspx
Coordinator
Aug 8, 2007 at 7:23 PM
Edited Aug 8, 2007 at 7:23 PM
Thanks for the contrib, and thanks for using the patch process!

Are you interested in doing this for SharpMap v2.0, which has a tool view interface to implement?
Aug 9, 2007 at 6:49 PM
There was some code I forgot to comment out before submitting the patch, and I can't seem to find a way to edit my patch on here, so unless you also download my GdalRasterLayer patch, you need to do this to get the MapToolBar code to build.

Go into the MapToolBar.cs file, there should be a method called cmdOneToOne_Click that looks like this

private void cmdOneToOne_Click(object sender, EventArgs e)
{
foreach (SharpMap.Forms.MapBox CurrentMap in Maps)
{
if (CurrentMap.Map != null && CurrentMap.Map.Layers.Count != 0)
{
CurrentMap.Map.ZoomOneToOne();
CurrentMap.Refresh();
}
}
}

Just comment out all the code inside the method and it should work.
Aug 9, 2007 at 7:00 PM
codekaizen:

I would be interested in working on this for v2.0, but I would like to wait until v2.0 is closer a beta stage.



codekaizen wrote:
Thanks for the contrib, and thanks for using the patch process!

Are you interested in doing this for SharpMap v2.0, which has a tool view interface to implement?