MapWindow Plug-in Development

Similar documents
v Introduction to WMS WMS 11.0 Tutorial Become familiar with the WMS interface Prerequisite Tutorials None Required Components Data Map

HOUR 4 Understanding Events

v Introduction to WMS Become familiar with the WMS interface WMS Tutorials Time minutes Prerequisite Tutorials None

How to use data sources with databases (part 1)

GIS LAB 8. Raster Data Applications Watershed Delineation

Tutorial 03 understanding controls : buttons, text boxes

The first thing we ll need is some numbers. I m going to use the set of times and drug concentration levels in a patient s bloodstream given below.

Quick Tips to Using I-DEAS. Learn about:

Learning VB.Net. Tutorial 17 Classes

A Guide to Autodesk Maya 2015

Geography 281 Mapmaking with GIS Project One: Exploring the ArcMap Environment

Geography 281 Mapmaking with GIS Project One: Exploring the ArcMap Environment

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

ADO.NET 2.0. database programming with

Learning VB.Net. Tutorial 19 Classes and Inheritance

Mach4 CNC Controller Screen Editing Guide Version 1.0

Introduction to using QGIS for Archaeology and History Workshop by the Empirical Reasoning Center

Thermacam Reporter 2000 Professional Template Building Tutorial

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations

City of La Crosse Online Mapping Website Help Document

This chapter is intended to take you through the basic steps of using the Visual Basic

Web-Friendly Sites. Planning & Design 1

Quick Guide to MapWindow GIS Desktop Application

MAPLOGIC CORPORATION. GIS Software Solutions. Getting Started. With MapLogic Layout Manager

A Second Visual BASIC Application : Greetings

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

v Overview SMS Tutorials Prerequisites Requirements Time Objectives

Tutorial For LamTopo

for ArcSketch Version 1.1 ArcSketch is a sample extension to ArcGIS. It works with ArcGIS 9.1

Tutorial 1 Exploring ArcGIS

Chapter 2 Exploration of a Visual Basic.Net Application

DOING MORE WITH WORD: MICROSOFT OFFICE 2007

Creating a template and printing from Geo

v SMS 11.2 Tutorial Overview Prerequisites Requirements Time Objectives

TUTORIAL 01: RHINO INTERFACE. By Jeremy L Roh, Professor of Digital Methods I UNC Charlotte s School of Architecture

GGR 375 QGIS Tutorial

Lab 3: Digitizing in ArcMap

MAPLOGIC CORPORATION. GIS Software Solutions. Getting Started. With MapLogic Layout Manager

Objectives This tutorial demonstrates how to use feature objects points, arcs and polygons to make grid independent conceptual models.

Working with Attribute Data and Clipping Spatial Data. Determining Land Use and Ownership Patterns associated with Streams.

CHAPTER 1 COPYRIGHTED MATERIAL. Getting to Know AutoCAD. Opening a new drawing. Getting familiar with the AutoCAD and AutoCAD LT Graphics windows

If there is not a shortcut icon on the desktop: Click on the Start menu > All Apps> and select Word 2016 from the list.

DOING MORE WITH WORD: MICROSOFT OFFICE 2010

Developing a Power Point Presentation

Getting Started with Word

Sample A2J Guided Interview & HotDocs Template Exercise

Excel 2013 Intermediate

Quartus II Tutorial. September 10, 2014 Quartus II Version 14.0

Customizing DAZ Studio

Advanced Layout Tools

SketchUp Tool Basics

Geographical Information Systems Institute. Center for Geographic Analysis, Harvard University. LAB EXERCISE 1: Basic Mapping in ArcMap

Map Direct Lite. Quick Start Guide: Map Layers 5/14/2018

1-Step Appraisals Personal Property Appraisal Software

Here we will look at some methods for checking data simply using JOSM. Some of the questions we are asking about our data are:

The Filter Property Selecting a File The Save Menu The SaveFileDialog Control The Edit Menu The Copy Menu...

Introduction to GIS & Mapping: ArcGIS Desktop

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

GoLive will first ask you if your new site will be for one individual or a work group; select for a Single User, and click Next.

Lab 3: Digitizing in ArcGIS Pro

Xchange for Samsung MAC User Guide. Version 2.4

2015 TECHNOLOGY SESSION: ADVANCING YOUR OUTLOOK 2013 SKILLS

Lesson 2 Installing and Using Quantum GIS (QGIS)

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

Level 3 Computing Year 2 Lecturer: Phil Smith

4Sight for Mac User Guide. Version 2.4

v SMS 11.1 Tutorial Overview Time minutes

Map Library ArcView Version 1 02/20/03 Page 1 of 12. ArcView GIS

This guide will show you how to create a basic multi-media PowerPoint presentation containing text, graphics, charts, and audio/video elements.

ADOBE DREAMWEAVER CS4 BASICS

In this lesson, you ll learn how to:

to display both cabinets. You screen should now appear as follows:

Development Authority of the North Country (DANC) Internet Mapping Application Instructions Public Viewer 1. Purpose. 2. Logging-in. 3.

Real Estate Flyer. Projects 1

DOING MORE WITH WORD: MICROSOFT OFFICE 2013

Visual Workflow Implementation Guide

Create a Scrolling Effect in PowerPoint 2007

Lesson 5: Creating Heterogeneous Parts

Watershed Modeling Advanced DEM Delineation

City of Richmond Interactive Map (RIM) User Guide for the Public

Windows 7 Control Pack for WinForms

_Tutorials. Arcmap. Linking additional files outside from Geodata

Introduction to QGIS: Instructor s Notes

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Delineating the Stream Network and Watersheds of the Guadalupe Basin

Create Geomark in Google Earth Tutorial

Upgrading Applications

Geology & Geophysics REU GPS/GIS 1-day workshop handout #2: Importing Field Data to ArcGIS

HOW TO BUILD YOUR FIRST ROBOT

CS-Studio Display Builder

Layout Tutorial. Getting Started. Creating a Layout Template

Working with PDF s. To open a recent file on the Start screen, double click on the file name.

Embedding and linking to media

GETTING STARTED TABLE OF CONTENTS

LAB 1: Introduction to ArcGIS 8

FLIR Tools+ and Report Studio

Using Microsoft Word. Text Editing

Step by Step How to Manual

Tutorial 01 Quick Start Tutorial

EXCEL BASICS: MICROSOFT OFFICE 2007

Transcription:

MapWindow Plug-in Development Sample Project: Simple Path Analyzer Plug-in A step-by-step guide to creating a custom MapWindow Plug-in using the IPlugin interface by Allen Anselmo shade@turbonet.com

Introduction The MapWindow open-source GIS platform is a system which contains a great deal of simple, straight-forward GIS functionality which overall is enough to meet the needs of many users. However, the greatest aspect of MapWindow is that it is not limited purely to the base functionality provided, but instead allows a fully extensible plug-in interface that allows users to customize their MapWindow functionality to meet their custom needs with some fairly simple.net code. Below is a step by step example of creating such a plug-in. In this case, the plugin will be a simple tool to display statistics of a polyline path given a Digital Elevation Model which the path overlays. By making use of this tutorial, you will be given the key elements for the most common plug-in interface functions and capabilities,. Further information for those topics not covered however can be found in Appendix 1, as well as the MapWindow documentation Wiki at http://www.mapwindow.org/wiki Step 1: Create a new VB.Net Class Library project using Microsoft Visual Studio. Step 2: Right-click on the class in Solution Explorer and select Properties Select the References page and click the Add button at the bottom of that form Then select the Browse tab and navigate to the location of and select the MapWinGIS.ocx and MapWininterfaces.dll, typically found in C:\Program Files\MapWindow\ as shown in Figure 1 below.

Figure 1: Adding reference to MapWinGIS and MapWinInterfaces Click OK to add the references Then set the Copy Local attribute of each reference to False after adding them

Step 3: Click the Add button again and this time select the.net tab From the list of components, select System.Drawing and OK, as seen in Figure 2. Figure 2: Adding System.Drawing Reference

Optional Step: In the compile settings, it is sometimes useful to set the build path to your MapWindow Plugins sub-directory or a sub-directory within it, such as C:\ Program Files\MapWindow\Plugins\PathAnalyzer directory. As seen in Figure 3. Figure 3: Setting the Compile Build Path This will save you the step of having to copy your plug-in DLL into the Plugins directory for MapWindow to load when it runs. If using this, do not forget that the path must be set for both Debug and Release properties. Step 4: Back in your code, after the Public Class... line, insert the line Implements MapWindow.Interfaces.IPlugin Hit enter on that interface and see how Visual Studio populates all of the interface properties and functions found in the IPlugin Interface. Step 5: See Appendix 1 for details on each of the properties and functions to give you a sense for how to use the plug-in interface to extend MapWindow. For now though, let s start with the most important pieces.

The single most important property is Name. Without this returning a valid string, the plug-in will not even be loaded into the plug-in list. So first, find the Name property and within the Get/End Get pair, type return Simple Path Analyzer Now build the project with CTRL+SHIFT+B (and if you didn t do the optional step to set build path, copy the resulting plug-in DLL into the Plugins directory). Then load MapWindow, select the Plug-ins menu and see how Simple Path Analyzer is listed there now and can be turned on and off by selecting it, as seen in Figure 4. Figure 4: Simple Path Analyzer in Plug-ins Menu Step 6: Of course, at this point, turning it on or off does nothing because its behavior on load and unload must be set through the Initialize and Terminate functions. Most commonly, these are used to create and remove menu items and buttons from the main MapWindow interface, which we ll do in the next step. It is simple to do this, though it should always be done in pairs so that lingering menu items aren t created or ones not created aren t trying to be destroyed. Before the properties and functions generated in Step 4, insert the text private g_mapwin as MapWindow.Interfaces.IMapWin Then, in the Initialize function, type g_mapwin = MapWin

This is setting a class object to hold a reference to the main MapWindow application. When each plug-in is initialized, it s Initialize function triggers and is passed the MapWin object that loaded it. This object has access to various useful objects useful for customizing the MapWindow interface, including access to menu and toolbar items, layers loaded, plug-ins loaded, status/progress bar messages, preview map capabilities, and application info. Step 7: The most common use of the g_mapwin object is to add and remove menu and toolbar items. First we ll look at menus, using the code below, which should be copied into the respective sections of your plug-in. In Initialize: Dim nil As Object nil = Nothing 'Create base menu item by passing no parent menu g_mapwin.menus.addmenu("btspsimplepathanalyzer", nil, "Watershed Delineation") 'Create sub menu items by passing parent menu of unique identifier of base menu g_mapwin.menus.addmenu("btsploadlayers", "btspsimplepathanalyzer", nil, "Load Layers") g_mapwin.menus.addmenu("btspanalyze", "btspsimplepathanalyzer", nil, "Analyze") In Terminate: 'Remove menus by unique identifiers g_mapwin.menus.remove("btsploadlayers") g_mapwin.menus.remove("btspanalyze") g_mapwin.menus.remove("btspsimplepathanalyzer") Rebuild (copy the DLL if needed) and rerun MapWindow to see what happens now when you run or terminate the Simple Path Analyzer plug-in. What happens if you comment out the g_mapwin.menus.remove("btspsimplepathanalyzer") line when you run MapWindow and run or terminate the plug-in? This lingering menu issue is why you always do the creation and removal of menu and toolbar items in pairs. Step 8: Next, look to how one creates a toolbar strip and icons with the following code to be copied into yours. Be sure to note that the icon file has to be added as an existing item to the solution and its type changed to embedded resource. In Initialize: 'Add icons by creating an icon from a bitmap object and adding to the mapwin toolbar 'Icon Analyze_16.ico has to be loaded to the solution as an embedded resource for it to create a bitmap Dim bt As New System.Drawing.Bitmap(Me.GetType(), "analyze_16.ico")

Dim ico As System.Drawing.Icon = System.Drawing.Icon.FromHandle(bt.GetHicon) Dim tlbbutton As MapWindow.Interfaces.ToolbarButton = MapWin.Toolbar.AddButton("sPathInfo", "spathanalyzer", "", "") tlbbutton.tooltip = "Simple Path Analyzer Tool" tlbbutton.picture = ico In Terminate: 'Remove button and then toolbar g_mapwin.toolbar.removebutton("spathinfo") g_mapwin.toolbar.removetoolbar("spathanalyzer") Rebuild (copy the DLL if needed) and rerun MapWindow to see what happens now when you run or terminate the Simple Path Analyzer plug-in now. Is there a toolbar strip being created with a button on it? Step 9: Now that you have menus and a toolbar button for the plug-in, let s make them actually do something. To do this, we ll use the most often used function of the plug-in interface excepting Initialize/Terminate. ItemClicked. This function triggers whenever a MapWindow button or menu item is clicked and the way that you tell what was clicked is based upon the unique name given to that item, as seen in the code below. Public Sub ItemClicked(ByVal ItemName As String, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.ItemClicked If ItemName = "spathinfo" Then MsgBox("Simple Path Analyzer Toolbar Button Clicked") ElseIf ItemName = "btsploadlayers" Then MsgBox("Simple Path Analyzer Load Layers Menu Item clicked") ElseIf ItemName = "btspanalyze" Then MsgBox("Simple Path Analyzer Analyze Menu Item clicked") End Sub Rebuild (copy the dll to the plugins directory if needed) and rerun MapWindow to initialize the plug-in and click on each menu item and toolbar button. Is a message popping up for each correctly? Step 10: Now that we ve seen a basic use of the buttons, let s actually make them do something a little more interesting. Start by creating a new Windows form in the project by right-clicking the solution in Solution Explorer and choosing the Add sub-menu and then Windows Form

Type frmaddlayers.vb for the name, as seen below in Figure 5, then click Add Figure 5: Adding a new form with frmaddlayers.vb name Once you have a new blank form, add three buttons and two textboxes.to look like Figure 6 below and change their properties as below. Also add an OpenFileDialog object to the form Figure 6: Add Layers form layout Form: Text to Add Layers Bottom Button: Text to OK Name to btnok DialogResult to OK Top Button:

Text to Open DEM Name to btnopendem Middle Button: Text to Open Path Name to btnopenpath Top Textbox: Name to txtbxdem Bottom Textbox: Name to txtbxpath OpenFileDialog: Name to fdiagopen Step 11: Right click on the form and select View Code then insert the following code for handling the form. Public DEMpath As String Public Pathpath As String Private Sub btnopendem_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btnopendem.click Dim g As New MapWinGIS.Grid fdiagopen.filter = g.cdlgfilter If fdiagopen.showdialog() Then txtbxdem.text = fdiagopen.filename DEMpath = txtbxdem.text End Sub Private Sub btnopenpath_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btnopenpath.click Dim sf As New MapWinGIS.Shapefile fdiagopen.filter = sf.cdlgfilter If fdiagopen.showdialog() Then 'Open Shapefile to test it for being a polyline type If sf.open(fdiagopen.filename) Then If sf.shapefiletype = MapWinGIS.ShpfileType.SHP_POLYLINE Then txtbxpath.text = fdiagopen.filename Pathpath = txtbxpath.text Else MsgBox("The path shapefile must be a polyline shapefile")

'close shapefile object sf.close() End Sub Private Sub btnok_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btnok.click If txtbxpath.text = "" Or txtbxdem.text = "" Or Not System.IO.File.Exists(txtbxPath.Text) Or Not System.IO.File.Exists(txtbxDEM.Text) Then MsgBox("You must add a filepath for both the DEM and Path values.") Me.DialogResult = Windows.Forms.DialogResult.None End Sub Now return to the main plug-in code and add the following Sub and class variables Private DEMpath As String Private Pathpath As String Private Sub LoadLayers() g_mapwin.layers.clear() DEMpath = "" Pathpath = "" Dim frmload As New frmaddlayers If frmload.showdialog = Windows.Forms.DialogResult.OK Then 'Set the class variables for paths to be used DEMpath = frmload.dempath Pathpath = frmload.pathpath 'Adds the pathes as layers to the map g_mapwin.layers.add(dempath) g_mapwin.layers.add(pathpath) End Sub Step 12: Then in the ItemClicked function modify it to the following to load layers on appropriate clicks and specifically pay attention to how you are able to set the cursor mode via the g_mapwin.view.cursormode in order to set it into selection mode. Public Sub ItemClicked(ByVal ItemName As String, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.ItemClicked If ItemName = "spathinfo" Then 'Only prompt if they haven't already set the pathes If DEMpath = "" And Pathpath = "" Then LoadLayers() 'Set into selection mode so when they select a path and trigger ShapesSelected g_mapwin.view.cursormode = MapWinGIS.tkCursorMode.cmSelection

ElseIf ItemName = "btsploadlayers" Then LoadLayers() ElseIf ItemName = "btspanalyze" Then 'Set into selection mode so when they select a path and trigger ShapesSelected g_mapwin.view.cursormode = MapWinGIS.tkCursorMode.cmSelection End Sub Now rebuild (copy the DLL if needed) and rerun MapWindow to click on the menu and toolbar button to see how it adds layers and sets into select mode. Step 13: Now that we ve got the buttons loading the needed layers and setting into a seemingly pointless selection mode, how do we actually make use of it? The answer is to use another plug-in interface function which is often useful in many types of plug-ins. ShapesSelected. This function will trigger whenever shapes are selected from a shapefile layer in the map. In this case, we will use this to calculate some simple statistics of the path selected. To do this, insert the following code in to the ShapesSelected interface function Dim sf As MapWinGIS.Shapefile Dim selectedshapeidx As Int16 If DEMpath <> "" And Pathpath <> "" Then 'make sure something was returned in SelectInfo If SelectInfo Is Nothing Then Exit Sub 'Grab the index of the first of selected shapes (in case multiple shapes selected) selectedshapeidx = SelectInfo(0).ShapeIndex 'Get the shapefile associated with current layer handle being selected from sf = g_mapwin.layers(handle).getobject ShowPathStats(sf.Shape(selectedShapeIdx)) Then add the private sub below: Private Sub ShowPathStats(ByVal path As MapWinGIS.Shape) Dim currelev, minelev, maxelev, avgelev, totelev, currlength, totlength As Double Dim currcol, currrow As Integer Dim g As New MapWinGIS.Grid Dim currpt1, currpt2 As MapWinGIS.Point minelev = 10000 maxelev = -10000 avgelev = 0 totelev = 0

totlength = 0 'Open the DEM grid g.open(dempath) 'cycle the vertex points of the shape passed For i As Integer = 0 To path.numpoints - 1 currpt1 = path.point(i) 'Find the grid cell associated with each point g.projtocell(currpt1.x, currpt1.y, currcol, currrow) 'Get elevation at that point currelev = g.value(currcol, currrow) 'Check for min/max elevations If currelev > maxelev Then maxelev = currelev If currelev < minelev Then minelev = currelev totelev = totelev + currelev Next avgelev = totelev / path.numpoints g.close() 'cycle from 1 up to get lengths between each vertex For i As Integer = 1 To path.numpoints - 1 currpt1 = path.point(i - 1) currpt2 = path.point(i) Next currlength = Math.Sqrt(Math.Pow(currPt2.x - currpt1.x, 2) + Math.Pow(currPt2.y - currpt1.y, 2)) totlength = totlength + currlength 'Show a message with the data MsgBox("Min Elevation: " + minelev.tostring + vbnewline + "Max Elevation: " + maxelev.tostring + vbnewline + "Average Elevation: " + avgelev.tostring + vbnewline + "Total Length: " + totlength.tostring) End Sub Step 14: With that done, rebuild (copy the DLL if needed) and rerun MapWindow and click the toolbar button, select a DEM and polyline shapefile, click OK, then select a path and watch it display the simple stats for that path. Congratulations! You ve created your first MapWindow plug-in. Hopefully you can see how useful

Appendix 1: Plug-in Framework Public ReadOnly Property Name() As String Implements MapWindow.Interfaces.IPlugin.Name o Name of the plugin as it will show on the Plugin menu o If name not specified, plugin won t load Public ReadOnly Property Author() As String Implements MapWindow.Interfaces.IPlugin.Author o Author name Public ReadOnly Property Description() As String Implements MapWindow.Interfaces.IPlugin.Description o Description of plugin Public ReadOnly Property BuildDate() As String Implements MapWindow.Interfaces.IPlugin.BuildDate o Often uses System.IO.File.GetLastWriteTime(Me.GetType().Assembly.Location) Public ReadOnly Property Version() As String Implements MapWindow.Interfaces.IPlugin.Version o Often uses System.Diagnostics.FileVersionInfo.GetVersionInfo(Me.GetType().Asse mbly.location).fileversion Subs to Implement On all functions, setting Handled to true will stop it from being sent to other plugins to enact Public Sub Initialize(ByVal MapWin As MapWindow.Interfaces.IMapWin, ByVal ParentHandle As Integer) Implements MapWindow.Interfaces.IPlugin.Initialize o Activates when plugin loads at mapwindow startup or activation from plugin menu o Standard to set a global g_mapwin = MapWin for access to mapwindow data Public Sub Terminate() Implements MapWindow.Interfaces.IPlugin.Terminate o Activates on unload of plugin or closing of mapwindow o Used mostly for removing buttons used by plugin Public Sub ItemClicked(ByVal ItemName As String, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.ItemClicked

o Triggers when a button or menu item is clicked. Can tell by internal name of button whether to activate code Public Sub LayerRemoved(ByVal Handle As Integer) Implements MapWindow.Interfaces.IPlugin.LayerRemoved o Fires when a layer is removed, in case plugin relies on specific layer Public Sub LayersAdded(ByVal Layers() As MapWindow.Interfaces.Layer) Implements MapWindow.Interfaces.IPlugin.LayersAdded o Fires when new layer is added, in case plugin relies on specific layers or maintains its own internal list of certain layers Public Sub LayersCleared() Implements MapWindow.Interfaces.IPlugin.LayersCleared o Fires when user clears all layers, useful for above reasons Public Sub LayerSelected(ByVal Handle As Integer) Implements MapWindow.Interfaces.IPlugin.LayerSelected o Fired when user selects layer Public Sub LegendDoubleClick(ByVal Handle As Integer, ByVal Location As MapWindow.Interfaces.ClickLocation, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.LegendDoubleClick o Fired when user double-clicks on a layer in the legend box, which currently will open up the layer properties, but can have further functionality Public Sub LegendMouseDown(ByVal Handle As Integer, ByVal Button As Integer, ByVal Location As MapWindow.Interfaces.ClickLocation, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.LegendMouseDown o Fires on normal mousedown event in the legend box Public Sub LegendMouseUp(ByVal Handle As Integer, ByVal Button As Integer, ByVal Location As MapWindow.Interfaces.ClickLocation, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.LegendMouseUp o Fires on normal mouseup event in the legend box Public Sub MapDragFinished(ByVal Bounds As System.Drawing.Rectangle, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapDragFinished o Fires after the user has finished a drag box on the map component, and gives the bounds as a drawing rectangle Public Sub MapExtentsChanged() Implements MapWindow.Interfaces.IPlugin.MapExtentsChanged

o Fires when user zooms or pans to change map extents Public Sub MapMouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Integer, ByVal y As Integer, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapMouseDown o Fires on click of the map component and tells which button, shift state, and point clicked on o X and Y are in screen coordinates, not map, so if you need map coordinates, must use g_mapwin.view.pixeltoproj() Public Sub MapMouseMove(ByVal ScreenX As Integer, ByVal ScreenY As Integer, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapMouseMove o Fires on mouse move across the map component o Coordinates again in screen format, as above Public Sub MapMouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Integer, ByVal y As Integer, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.MapMouseUp o Fires on mouse up on the map component o Coordinates still in screen form Public Sub Message(ByVal msg As String, ByRef Handled As Boolean) Implements MapWindow.Interfaces.IPlugin.Message o Fired when a plugin sends out a message which will be redirected to all other plugins to allow communication o If a plugin determines message is For them, they can set handled to true to stop it sending to others Public Sub ProjectLoading(ByVal ProjectFile As String, ByVal SettingsString As String) Implements MapWindow.Interfaces.IPlugin.ProjectLoading o Fires when user opens a project file o SettingString holds information saved by the plugin at the project level, such as a database path associated with the project specifically Public Sub ProjectSaving(ByVal ProjectFile As String, ByRef SettingsString As String) Implements MapWindow.Interfaces.IPlugin.ProjectSaving o Fires when user saves a project o SettingString allows the plugin to save information tied to plugin at the project level, such as a database path associated with that project specifically Public Sub ShapesSelected(ByVal Handle As Integer, ByVal SelectInfo As MapWindow.Interfaces.SelectInfo) Implements MapWindow.Interfaces.IPlugin.ShapesSelected o Fires when shapes are selected in a shapefile layer

o SelectInfo holds which were selected