2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project

Size: px
Start display at page:

Download "2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project"

Transcription

1 1. Introduction GDS Google Map is a Desktop.Net User Control, which can be embedded in Windows Forms Applications or hosted in WPF Applications. It integrates an interactive Google Map into your desktop application thus providing a fast and convenient way for software developers to display customized geographic data on top of the Google Map. The GDS Google Map combines the power of.net Desktop Control and Google Map API to provide an enhanced mapping experience. There are two editions of GDS Google Map: Professional and Ultimate. This document describes how to work with GDS Google Map Ultimate. We use C# with Visual Studio 2010 throughout this document. 2. Getting started with GDS Google Map 2.1 System Requirements GDS Google Map requires a minimal of.net 4.0 Framework on 64-bit Windows 7 with Visual Studio It has been tested on.net 4.0, 4.5, 4.5.1, 4.5.2, 4.6, and on Windows 7, 8.1 and 10 with Visual Studio 2010, 2012, 2013 and How to install Download Gds.GoogleMap.Ultimate.Setup.msi from Run the installer and follow the screen instructions to complete the installation. Gds.GoogleMap.Ultimate.dll will be installed in the folder of C:\Program Files (x86)\gds Design & Development Ltd\GDS Google Map Ultimate V by default unless you choose other path. 2.3 Add GDS Google Map to Visual Studio Toolbox and create a simple map project Launch Visual Studio, create a new Windows Forms project and name it as SimpleMap ; All Rights Reserved 1/123

2 2.3.2 Bring up Toolbox window, then move mouse on the toolbox, then right click, then choose Add Tab as shown in Figure 2.3.1; Figure Add Tab in Visual Studio 2010 Toolbox Name the newly created Tab as GDS Google Map Ultimate, then right click on it, and then click Choose Items menu item as Figure 2.3.2; All Rights Reserved 2/123

3 Figure Choose Item on GDS Google Map Ultimate Tab Click on Browse on Choose Toolbox Items window as Figure 2.3.3; All Rights Reserved 3/123

4 Figure Choose Toolbox Item Window As shown on Figure 2.3.4, navigate to the folder where GDS Google Map Ultimate was installed, then select Gds.GoogleMap.Ultimate.dll, then click Open button, then click Ok on the Choose Toolbox Items window; All Rights Reserved 4/123

5 Figure Open File Window to locate executables You will see GDS Google Map Ultimate together with other GDS customized controls show up under GDS Google Map Ultimate tab as Figure 2.3.5; All Rights Reserved 5/123

6 Figure GDS Google Map Ultimate added on Toolbox Click on Tools -> Options to bring up the Options Window; Navigate to Windows Forms Designer -> General ; Make sure that Toolbox -> AutoToolboxPopulate is set to True as Figure 2.3.6; You might need to choose False then True ; Then click OK button; All Rights Reserved 6/123

7 Figure Options Window Windows Forms Designer - General Click Files -> Save All, or the Save All shortcut on the toolbar. It is very important to do this. Otherwise, next time you start Visual Studio 2010, you will have to redo all the steps again; Drag Map to Form1; resize it properly; Name it to _map; set its Dock property to Fill, then click on Save All shortcut; then compile and run, you will have your first un-licensed Google Map integrated into a Windows Form Application as Figure All Rights Reserved 7/123

8 Figure Screen-cut of SimpleMap program 2.4 How to register Run the SimpleMap program mentioned in 2.3.9, then click on the Register button to bring up the Register window as Figure 2.4.1: All Rights Reserved 8/123

9 Figure Register Window If you have made a purchase, please provide the registration code. Otherwise, please choose 30-Day Trial License Please also provide your valid address to which the license key will be sent Click on the Register button to register the product. After successful registration, the license key will be ed to you immediately. Please check your spam box if you don t see it in your inbox Please see for how to use your license key. All Rights Reserved 9/123

10 3. Working with GDS Google Map 3.1 Markers Map Create a new Windows Forms Application project named MarkersMap ; Rename Form1 to MarkersForm; drag Map to it, build the UI as Figure 3.1.1; Figure Markers Map UI All Rights Reserved 10/123

11 3.1.3 Set Map.GdsGoogleMapLicenseKey property. You can set it from the Properites Panel inside Visual Studio in Design time, then save your project. Then close the MarkersForm.cs [Design], and then re-open it. You will see a Google Map on the Form. Or you can set it programmably. If you choose to programmably set it, please set it where the instance of Gds.GoogleMap.Ultimate.Map is created as the following: _map = new Gds.GoogleMap.Ultimate.Map GdsGoogleMapLicenseKey = "Your license key" ; Please note that the license key is one line string, no space before, after or in the middle. Otherwise, you will see invalid license error. The best way is to do copy and paste from the you receive Put the following codes in MarkersForm.cs: using System; using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class MarkersForm : Form private CharPinLayer _charpinlayer; private DotPinLayer _dotpinlayer; private IconPinLayer _iconpinlayer; private TextPinLayer _textpinlayer; private IconPinLayer _taxilayer; private IconPin _taxi; public MarkersForm() InitializeComponent(); _map.mapinitialized += OnMapInitialized; All Rights Reserved 11/123

12 _map.mapcharpinmousemove += OnMapCharPinMouseMove; _map.mapcharpinmouseleave += OnMapCharPinMouseLeave; _map.mapdotpinmousemove += OnMapDotPinMouseMove; _map.mapdotpinmouseleave += OnMapDotPinMouseLeave; _map.mapiconpinmousemove += OnMapIconPinMouseMove; _map.mapiconpinmouseleave += OnMapIconPinMouseLeave; _map.maptextpinmousemove += OnMapTextPinMouseMove; _map.maptextpinmouseleave += OnMapTextPinMouseLeave; _visiblecheckbox.click += OnVisibleCheckBoxClick; _inspectablecheckbox.click += OnInspectableCheckBoxClick; _showdescriptioncheckbox.click += OnShowDescriptionCheckBoxClick; _movebutton.click += OnMoveButtonClick; _changedisplaysettingsbutton.click += OnChangeDisplaySettingsButtonClick; _changedescriptionbutton.click += OnChangeDescriptionButtonClick; _addmarkerbutton.click += OnAddMarkerButtonClick; private void PopulateUi() _visiblecheckbox.checked = _charpinlayer.visible; _inspectablecheckbox.checked = _charpinlayer.inspectable; _showdescriptioncheckbox.checked = _charpinlayer.showdescription; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _map.maptypecontrolenable = false; _charpinlayer = _map.featurelayercollection.addcharpinlayer( "CharPinLayer" ); _dotpinlayer = _map.featurelayercollection.adddotpinlayer( "DotPinLayer" ); _iconpinlayer = _map.featurelayercollection.addiconpinlayer( "IconPinLayer" ); _textpinlayer = _map.featurelayercollection.addtextpinlayer( "TextPinLayer" ); _taxilayer = _map.featurelayercollection.addiconpinlayer( "TaxiLayer" ); All Rights Reserved 12/123

13 PopulateUi(); _charpinlayer.collection.add( new CharPin( , , "RBC Bank\r\nBridlewood Shopping Centre\r\n th St SW, Calgary, AB\r\nPhone: (403) \r\nTransit #180", "R" ) ); _dotpinlayer.collection.add( new DotPin( , , "RBC Bank\r\nBonavista\r\n755 Lake Bonavista Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #9099" ), DisplayModeOption.Normal, new DotPinDisplaySettings PinStyle = PinStyleOption.Star, new DotPinDisplaySettings PinStyle = PinStyleOption.Star, FillColor = Color.Green, ); _iconpinlayer.collection.add( new IconPin( , , "RBC Bank\r\nGates Of Walden\r\n151 Walden Gate SE, Calgary, AB\r\nPhone: (403) \r\nTransit #1436", IconPinOption.BankDollar ) ); _textpinlayer.collection.add( new TextPin( , , "RBC Bank\r\nDeer Valley Market Place\r\n1221 Canyon Meadows Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #629", "RBC" ), DisplayModeOption.Normal, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8, FillColor = Color.Green, All Rights Reserved 13/123

14 );, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8, FillColor = Color.Yellow, catch _taxi = new IconPin( , , "Moving Taxi", IconPinOption.Taxi ); _taxilayer.collection.add( _taxi ); private void OnMapCharPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _charpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); catch private void OnMapCharPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _charpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch private void OnMapDotPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); catch All Rights Reserved 14/123

15 private void OnMapDotPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch private void OnMapIconPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _map.featurelayercollection.geticonpinlayer( e.layerid ).Collection. SetDisplayMode( e.markerindex, DisplayModeOption.Highlight ); catch private void OnMapIconPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _map.featurelayercollection.geticonpinlayer( e.layerid ).Collection.SetDisplayMode( e.markerindex, DisplayModeOption.Normal ); catch private void OnMapTextPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); catch All Rights Reserved 15/123

16 private void OnMapTextPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch private void OnVisibleCheckBoxClick( object sender, EventArgs e ) _charpinlayer.visible = _visiblecheckbox.checked; _dotpinlayer.visible = _visiblecheckbox.checked; _iconpinlayer.visible = _visiblecheckbox.checked; _textpinlayer.visible = _visiblecheckbox.checked; _taxilayer.visible = _visiblecheckbox.checked; catch private void OnInspectableCheckBoxClick( object sender, EventArgs e ) _charpinlayer.inspectable = _inspectablecheckbox.checked; _dotpinlayer.inspectable = _inspectablecheckbox.checked; _iconpinlayer.inspectable = _inspectablecheckbox.checked; _textpinlayer.inspectable = _inspectablecheckbox.checked; _taxilayer.inspectable = _inspectablecheckbox.checked; catch private void OnShowDescriptionCheckBoxClick( object sender, EventArgs e ) _charpinlayer.showdescription = _showdescriptioncheckbox.checked; All Rights Reserved 16/123

17 catch _dotpinlayer.showdescription = _showdescriptioncheckbox.checked; _iconpinlayer.showdescription = _showdescriptioncheckbox.checked; _textpinlayer.showdescription = _showdescriptioncheckbox.checked; _taxilayer.showdescription = _showdescriptioncheckbox.checked; private void OnMoveButtonClick( object sender, EventArgs e ) _taxilayer.collection.setlocation( 0, _taxi.lat , _taxi.lng ); catch private void OnChangeDisplaySettingsButtonClick( object sender, EventArgs e ) _changedisplaysettingsbutton.enabled = false; var dpds = new DotPinDisplaySettings DotColor = Color.Blue, FillColor = Color.Purple, PinStyle = PinStyleOption.Star, StarFillColor = Color.Yellow, ; _dotpinlayer.displaysettings = dpds; var cpds = new CharPinDisplaySettings CharColor = Color.Blue, FillColor = Color.Purple, PinStyle = PinStyleOption.Star, StarFillColor = Color.Yellow ; _charpinlayer.displaysettings = cpds; var ipds = new IconPinDisplaySettings FillColor = Color.Purple, PinStyle = PinStyleOption.Star, All Rights Reserved 17/123

18 StarFillColor = Color.Yellow ; _iconpinlayer.displaysettings = ipds; var tpds = new TextPinDisplaySettings FillColor = Color.Purple, FontBold = true, FontSize = 9, RotationDegree = 90, ScaleFactor = 0.9 ; _textpinlayer.displaysettings = tpds; dpds = new DotPinDisplaySettings DotColor = Color.Blue, FillColor = Color.Pink, PinStyle = PinStyleOption.Star, StarFillColor = Color.Yellow ; _dotpinlayer.highlightdisplaysettings = dpds; cpds = new CharPinDisplaySettings CharColor = Color.Blue, FillColor = Color.Pink, PinStyle = PinStyleOption.Star, StarFillColor = Color.Yellow ; _charpinlayer.highlightdisplaysettings = cpds; ipds = new IconPinDisplaySettings FillColor = Color.Pink, PinStyle = PinStyleOption.Star, StarFillColor = Color.Yellow ; _iconpinlayer.highlightdisplaysettings = ipds; tpds = new TextPinDisplaySettings FillColor = Color.Pink, FontBold = true, FontSize = 9, All Rights Reserved 18/123

19 ; RotationDegree = 90, ScaleFactor = 0.9 catch _textpinlayer.highlightdisplaysettings = tpds; private void OnChangeDescriptionButtonClick( object sender, EventArgs e ) for( var i = 0; i < _charpinlayer.collection.count; i++) var des = _charpinlayer.collection[ i ].Description; catch _charpinlayer.collection.setdescription( i, des + Environment.NewLine + "New Description"); private void OnAddMarkerButtonClick( object sender, EventArgs e ) _addmarkerbutton.enabled = false; _textpinlayer.collection.add( new TextPin( , , "RBC Bank\r\nShawnessy Centre\r\n250 Shawville Blvd SE, Calgary, AB\r\nPhone: (403) \r\nTransit #2299", "RBC" ) ); Compile and run, you will see five markers showing on the map as Figure 3.1.2; All Rights Reserved 19/123

20 Figure Screen-cut of Markers Map Move the mouse over the red Char Pin marker, you will see its color change to light blue and a description tooltip show up as Figure 3.1.3; All Rights Reserved 20/123

21 Figure Highlighted Char Pin Marker with description tooltip Un-check Inspectable Checkbox and click Change Description Button; then move the mouse over the same Char Pin marker to see that the Char Pin marker stays with the same color with the New Description added to the end of the original description tooltip shown as Figure 3.1.4; All Rights Reserved 21/123

22 Figure Un-highlighted Char Pin Marker with new description Click Move button couple times and you will see the marker with taxi icon move to new location as Figure All Rights Reserved 22/123

23 Figure New Location of Taxi Icon Marker Click Change Display Settings button and see that all markers change to color purple; move the mouse over RBC Marker and see that its color changes to pink and description tooltip shows up as Figure 3.1.6; All Rights Reserved 23/123

24 Figure Markers with new normal display settings and new highlight display settings Please note that you have to call Collection.SetLocation method if you want to change the latitude and longitude of the marker. The same for Icon Layer where you call Collection.SetLocation, Polyline Layer call Collection.SetPath, Polygon Layer call Collection.SetPath and Heatmap Layer call Collection.SetData. All Rights Reserved 24/123

25 3.2 Icons Map Create a new Windows Forms Application project and named it IconsMap ; Find two 32 x 32 png icons, add them into Resources and name them as TD32 and TDHighlight32; Rename Form1.cs to IconsForm.cs and create the GUI as Figure 3.2.1; Fig Icons Map GUI Design All Rights Reserved 25/123

26 3.2.4 Code as the following source code: using System; using System.Drawing.Imaging; using System.IO; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; using GdsGoogleMapUltimateSamples.Properties; using Icon = Gds.GoogleMap.Ultimate.Features.Icon; namespace GdsGoogleMapUltimateSamples public partial class IconsForm : Form private const string TdLayer = "TD"; private const string TruckLayer = "Truck"; private readonly string _tdiconpath; private readonly string _tdhighlighticonpath; private readonly string _truckiconpath; private IconLayer _tdlayer; private IconLayer _trucklayer; private Icon _movingicon; public IconsForm() InitializeComponent(); _tdiconpath = Path.GetTempPath() + "\\TdIcon32.png"; _tdhighlighticonpath = Path.GetTempPath() + "\\TdHighlightIcon32.png"; _truckiconpath = Path.GetTempPath() Resources.TD32.Save( _tdiconpath, ImageFormat.Png ); Resources.TDHighlight32.Save( _tdhighlighticonpath, ImageFormat.Png ); Resources.Truck32.Save( _truckiconpath, ImageFormat.Png ); _map.mapinitialized += OnMapInitialized; _map.mapiconmousemove += OnMapIconMouseMove; _map.mapiconmouseleave += OnMapIconMouseLeave; All Rights Reserved 26/123

27 _visiblecheckbox.click += OnVisibleCheckBoxClick; _inspectablecheckbox.click += OnInspectableCheckBoxClick; _showdescriptioncheckbox.click += OnShowDescriptionCheckBoxClick; _movebutton.click += OnMoveButtonClick; _changedisplaysettingsbutton.click += OnChangeDisplaySettingsButtonClick; _changedescriptionbutton.click += OnChangeDescriptionButtonClick; _addiconbutton.click += OnAddIconButtonClick; private void PopulateUi() _visiblecheckbox.checked = _tdlayer.visible; _inspectablecheckbox.checked = _tdlayer.inspectable; _showdescriptioncheckbox.checked = _tdlayer.showdescription; private void SetIconDispalyMode( string layerid, int iconindex, DisplayModeOption displaymode ) var layer = ( IconLayer ) _map.featurelayercollection [ layerid ]; layer.collection.setdisplaymode( iconindex, displaymode ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 13; _tdlayer = _map.featurelayercollection.addiconlayer( TdLayer ); PopulateUi(); _tdlayer.displaysettings = new IconDisplaySettings IconImagePath = _tdiconpath, ; _tdlayer.highlightdisplaysettings = new IconDisplaySettings IconImagePath = _tdhighlighticonpath, ; _tdlayer.collection.add( new Icon( , , All Rights Reserved 27/123 "TD

28 ) ); Bank\r\nSuite 100, 803 Chaparral Dr SE, Calgary, AB\r\nPhone: (403) \r\nBranch # 8023" catch _trucklayer = _map.featurelayercollection.addiconlayer( TruckLayer ); _trucklayer.displaysettings = new IconDisplaySettings IconImagePath = _truckiconpath, ; _trucklayer.highlightdisplaysettings = new IconDisplaySettings IconImagePath = _truckiconpath, ; _movingicon = new Icon( , , "Moving Truck" ); _trucklayer.collection.add( _movingicon ); private void OnMapIconMouseMove( object sender, MapIconMouseMoveEventArgs e ) SetIconDispalyMode( e.layerid, e.iconindex, DisplayModeOption.Highlight ); catch private void OnMapIconMouseLeave( object sender, MapIconMouseLeaveEventArgs e ) SetIconDispalyMode( e.layerid, e.iconindex, DisplayModeOption.Normal ); catch All Rights Reserved 28/123

29 private void OnVisibleCheckBoxClick( object sender, EventArgs e ) _tdlayer.visible = _visiblecheckbox.checked; _trucklayer.visible = _visiblecheckbox.checked; catch private void OnInspectableCheckBoxClick( object sender, EventArgs e ) _tdlayer.inspectable = _inspectablecheckbox.checked; _trucklayer.inspectable = _inspectablecheckbox.checked; catch private void OnShowDescriptionCheckBoxClick( object sender, EventArgs e ) _tdlayer.showdescription = _showdescriptioncheckbox.checked; _trucklayer.showdescription = _showdescriptioncheckbox.checked; catch private void OnMoveButtonClick( object sender, EventArgs e ) if ( _trucklayer == null _movingicon == null ) return; _trucklayer.collection.setlocation( 0, _movingicon.lat , _movingicon.lng ); private void OnChangeDisplaySettingsButtonClick( object sender, EventArgs e ) All Rights Reserved 29/123

30 _changedisplaysettingsbutton.enabled = false; catch var ds = new IconDisplaySettings IconImagePath = _tdhighlighticonpath ; _tdlayer.displaysettings = ds; var hds = new IconDisplaySettings IconImagePath = _tdiconpath ; _tdlayer.highlightdisplaysettings = hds; private void OnChangeDescriptionButtonClick( object sender, EventArgs e ) _tdlayer.collection.setoptions( 0, "New Hello" ); catch private void OnAddIconButtonClick( object sender, EventArgs e ) _addiconbutton.enabled = false; catch _tdlayer.collection.add( new Icon( , , "TD Bank\r\nUnit 620, Sheriff King St SW, Calgary, AB\r\nPhone: (403) \r\nBranch # 8019" ) ); All Rights Reserved 30/123

31 3.2.5 Run the program and you will see as Figure 3.2.2; Figure Screen-cut of Icons Map program Move mouse over a TD icon, you will see a highlighted TD icon and a description label show up as Figure 3.2.3; All Rights Reserved 31/123

32 Figure Inspect an Icon Play with program and see more results similar to the Markers Map program. 3.3 Polylines Map Create a new Windows Forms Application project and name it PolylinesMap ; Rename the Form1.cs to PolylinesForm.cs and build the UI as Figure 3.3.1; All Rights Reserved 32/123

33 Figure Polylines Map GUI Design Code as the following source code: using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.GeoData; All Rights Reserved 33/123

34 using Gds.GoogleMap.Ultimate.MapEvents; using Gds.GoogleMap.Ultimate.Styles; namespace GdsGoogleMapUltimateSamples public partial class PolylinesForm : Form private PolylineLayer _roadlayer; public PolylinesForm() InitializeComponent(); _map.mapinitialized += OnMapInitialized; _map.mappolylinemousemove += OnMapPolylineMouseMove; _map.mappolylinemouseleave += OnMapPolylineMouseLeave; _visiblecheckbox.click += OnVisibleCheckBoxClick; _inspectablecheckbox.click += OnInspectableCheckBoxClick; _changedisplaysettingsbutton.click += OnChangeDisplaySettingsButtonClick; _addpolylinebutton.click += OnAddPolylineButtonClick; private void PopulateUi() _visiblecheckbox.checked = _roadlayer.visible; _inspectablecheckbox.checked = _roadlayer.inspectable; private void SetPolylineDispalyMode( string layerid, int index, DisplayModeOption displaymode ) var layer = ( PolylineLayer ) _map.featurelayercollection[ layerid ]; layer.collection.setdisplaymode( index, displaymode ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _roadlayer = _map.featurelayercollection.addpolylinelayer( "RoadLayer" ); PopulateUi(); All Rights Reserved 34/123

35 var latlnglst = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; _roadlayer.collection.add( new Polyline( latlnglst ) ); var latlnglst = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; _roadlayer.collection.add( new Polyline( latlnglst ), DisplayModeOption.Normal, new PolylineDisplaySettings StrokeColor = Color.Green, StrokeOpacity = 0.8, StrokeWeight = 6, Style = new LineArrowStyle( ArrowStyleOption.ForwardOpenArr ow ), new PolylineDisplaySettings StrokeColor = Color.LightBlue, StrokeOpacity = 0.8, StrokeWeight = 6, Style = new LineArrowStyle( ArrowStyleOption.ForwardOpenArr ow ) ); var latlnglst = new List<LatLng> All Rights Reserved 35/123

36 ; new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), _roadlayer.collection.add( new Polyline( latlnglst ), DisplayModeOption.Normal, new PolylineDisplaySettings StrokeColor = Color.Purple, StrokeOpacity = 0.8, StrokeWeight = 4, Style = new LineArrowStyle( ArrowStyleOption.Circle ), new PolylineDisplaySettings StrokeColor = Color.LightBlue, StrokeOpacity = 0.8, StrokeWeight = 4, Style = new LineArrowStyle( ArrowStyleOption.Circle ) ); catch ( Exception ex ) Text = ex.message; private void OnVisibleCheckBoxClick( object sender, EventArgs e ) _roadlayer.visible = _visiblecheckbox.checked; catch ( Exception ex ) Text = ex.message; private void OnInspectableCheckBoxClick( object sender, EventArgs e ) All Rights Reserved 36/123

37 _roadlayer.inspectable = _inspectablecheckbox.checked; catch ( Exception ex ) Text = ex.message; private void OnChangeDisplaySettingsButtonClick( object sender, EventArgs e ) _roadlayer.displaysettings = new PolylineDisplaySettings StrokeColor = Color.Red, StrokeOpacity = 0.8, StrokeWeight = 10, Style = new LineDashStyle( DashStyleOption.Solid ), ; _roadlayer.highlightdisplaysettings = new PolylineDisplaySettings StrokeColor = Color.Blue, StrokeOpacity = 0.8, StrokeWeight = 10, Style = new LineDashStyle( DashStyleOption.Solid ), ; catch ( Exception ex ) Text = ex.message; private void OnMapPolylineMouseMove( object sender, MapPolylineMouseMoveEventArgs e ) SetPolylineDispalyMode( e.layerid, e.polylineindex, DisplayModeOption.Highlight ); catch ( Exception ex ) Text = ex.message; All Rights Reserved 37/123

38 private void OnMapPolylineMouseLeave( object sender, MapPolylineMouseLeaveEventArgs e ) SetPolylineDispalyMode( e.layerid, e.polylineindex, DisplayModeOption.Normal ); catch ( Exception ex ) Text = ex.message; private void OnAddPolylineButtonClick( object sender, EventArgs e ) var latlnglst = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; _roadlayer.collection.add( new Polyline( latlnglst ), DisplayModeOption.Normal, new PolylineDisplaySettings StrokeColor = Color.Gray, StrokeOpacity = 1.0, StrokeWeight = 4, Style = new LineDashStyle( DashStyleOption.Dash ), new PolylineDisplaySettings StrokeColor = Color.LightBlue, StrokeOpacity = 1.0, StrokeWeight = 4, Style = new LineDashStyle( DashStyleOption.Dash ) ); catch ( Exception ex ) Text = ex.message; All Rights Reserved 38/123

39 3.3.4 Run and play the program and you will see as follow screen cuts: Figure Polylines Map All Rights Reserved 39/123

40 Figure Added Polyline and highlighted Polyline 3.4 Polygons Map Create a Windows Forms Application project and name it PolygonsMap ; Rename Form1.cs to PolygonsForm.cs and create the following UI as Figure 3.4.1; All Rights Reserved 40/123

41 Figure Polygons Map GUI Design Code the following source code: using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.Features; All Rights Reserved 41/123

42 using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class PolygonsForm : Form private class CommunityFeature : Polygon public string Description get; private set; public CommunityFeature( List<LatLng> latlngs, string description ) : base( latlngs ) Description = description; private PolygonLayer _communitylayer; public PolygonsForm() InitializeComponent(); _map.mapinitialized += OnMapInitialized; _map.mappolygonmousemove += OnMapPolygonMouseMove; _map.mappolygonmouseleave += OnMapPolygonMouseLeave; _map.mappolygonmouseclick += OnMapPolygonMouseClick; _visiblecheckbox.click += OnVisibleCheckBoxClick; _inspectablecheckbox.click += OnInspectableCheckBoxClick; _changedisplaysettingsbutton.click += OnChangeDisplaySettingsButtonClick; _addpolygonbutton.click += OnAddPolygonButtonClick; private void PopulateUi() _visiblecheckbox.checked = _communitylayer.visible; _inspectablecheckbox.checked = _communitylayer.inspectable; private void SetPolygonDisplayMode( string layerid, int index, DisplayModeOption displaymode ) var layer = ( PolygonLayer ) _map.featurelayercollection [ layerid ]; layer.collection.setdisplaymode( index, displaymode ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) All Rights Reserved 42/123

43 _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _communitylayer = _map.featurelayercollection.addpolygonlayer( "CommunityLayer" ); PopulateUi(); var latlngs = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; var cf = new CommunityFeature( latlngs, "Sundance Community" ); _communitylayer.collection.add( cf, DisplayModeOption.Normal, new PolygonDisplaySettings FillColor = Color.Purple, FillOpacity = 0.6, StrokeColor = Color.Purple, StrokeOpacity = 1.0, StrokeWeight = 4, new PolygonDisplaySettings FillColor = Color.LightBlue, FillOpacity = 0.6, StrokeColor = Color.LightBlue, StrokeOpacity = 1.0, StrokeWeight = 4 ); All Rights Reserved 43/123

44 catch ( Exception ex ) Text = ex.message; private void OnMapPolygonMouseClick( object sender, MapPolygonMouseClickEventArgs e ) var layer = ( PolygonLayer ) _map.featurelayercollection [ e.layerid ]; var cf = ( CommunityFeature ) layer.collection [ e.polygonindex ]; if ( e.button == MapMouseButtonOption.Left ) MessageBox.Show( "Left Click on " + cf.description ); else if ( e.button == MapMouseButtonOption.Right ) MessageBox.Show( "Right Click on " + cf.description ); catch ( Exception ex ) Text = ex.message; private void OnMapPolygonMouseLeave( object sender, MapPolygonMouseLeaveEventArgs e ) SetPolygonDisplayMode( e.layerid, e.polygonindex, DisplayModeOption.Normal ); catch (Exception ex ) Text = ex.message; private void OnMapPolygonMouseMove( object sender, MapPolygonMouseMoveEventArgs e ) All Rights Reserved 44/123

45 SetPolygonDisplayMode( e.layerid, e.polygonindex, DisplayModeOption.Highlight ); catch ( Exception ex ) Text = ex.message; private void OnVisibleCheckBoxClick( object sender, EventArgs e ) _communitylayer.visible = _visiblecheckbox.checked; catch ( Exception ex ) Text = ex.message; private void OnInspectableCheckBoxClick( object sender, EventArgs e ) _communitylayer.inspectable = _inspectablecheckbox.checked; catch ( Exception ex ) Text = ex.message; private void OnChangeDisplaySettingsButtonClick( object sender, EventArgs e ) _communitylayer.displaysettings = new PolygonDisplaySettings FillColor = Color.Green, FillOpacity = 0.8, StrokeColor = Color.Green, StrokeOpacity = 1.0, StrokeWeight = 4 ; _communitylayer.highlightdisplaysettings = new PolygonDisplaySettings All Rights Reserved 45/123

46 FillColor = Color.LightBlue, FillOpacity = 0.8, StrokeColor = Color.LightBlue, StrokeOpacity = 1.0, StrokeWeight = 4 ; catch ( Exception ex ) Text = ex.message; private void OnAddPolygonButtonClick( object sender, EventArgs e ) _addpolygonbutton.enabled = false; var latlngs = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; var cf = new CommunityFeature( latlngs, "Chaparell Community" ); _communitylayer.collection.add( cf ); catch ( Exception ex ) Text = ex.message; Run and play. You will see the following screen-cuts: All Rights Reserved 46/123

47 Figure Polygons Map Program first run All Rights Reserved 47/123

48 Figure Added Polygon All Rights Reserved 48/123

49 Figure Inspect Red Polygon Mouse Over All Rights Reserved 49/123

50 Figure Mouse Left Click on Purple Polygon All Rights Reserved 50/123

51 Figure Mouse Right Click on Red Polygon 3.5 Geocoding, Map Types and Copy Map Create a Windows Forms Application project and name it GeocodingMap ; Rename Form1 to GeocodingForm and create the GUI as Figure 3.5.1; All Rights Reserved 51/123

52 Figure Geocoding Map GUI Design Code the following source code: using System; using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.Geocoding; using Gds.GoogleMap.Ultimate.Geocoding.Requests; All Rights Reserved 52/123

53 using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class GeocodingForm : Form private static readonly string [] AddressArray = new [] " Coun Hills Blvd NW, Calgary, AB", "87 Crowfoot Way NW B7, Calgary", ; private IconPinLayer _geocodinglayer; private Bitmap _image; private readonly Timer _timer; private int _addressindex; public GeocodingForm() InitializeComponent(); _timer = new Timer Interval = 500 ; _timer.tick += OnTimerTick; _addressindex = 0; _map.mapinitialized += OnMapInitialized; _map.geocodingservice.geocodingcompleted += OnGeocodingCompleted; _copymapimagetoolstripbutton.click += OnCopyMapImageToolStripButtonClick; _imagelabel.paint += OnImageLabelPaint; private void OnTimerTick( object sender, EventArgs e ) _timer.enabled = false; _map.geocodingservice.begingeocoding( new GeocoderAddressRequest Address = AddressArray [ _addressindex ] ); catch (Exception ex ) Text = ex.message; All Rights Reserved 53/123

54 _addressindex++; if ( _addressindex >= 0 && _addressindex < AddressArray.Length ) _timer.enabled = true; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 13; _map.maptypeid = MapTypeIdOption.Hybrid; _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _geocodinglayer = _map.featurelayercollection.addiconpinlayer( "GeocodingLayer" ); _timer.enabled = true; catch ( Exception ex ) Text = ex.message; private void OnGeocodingCompleted( object sender, GeocodingCompletedEventArgs e ) if ( e.status!= GeocoderStatusOption.Ok ) return; foreach ( var result in e.resultcollection ) _geocodinglayer.collection.add( new IconPin( result.geome.location.lat, result.geome.location.lng, result.formattedaddress, IconPinOption.Restaurant ) ); catch ( Exception ex ) Text = ex.message; All Rights Reserved 54/123

55 private void OnCopyMapImageToolStripButtonClick( object sender, EventArgs e ) _image = _map.mapimage; _imagelabel.invalidate(); catch ( Exception ex ) Text = ex.message; private void OnImageLabelPaint( object sender, PaintEventArgs e ) if ( _image == null ) return; e.graphics.drawimage( _image, 0, 0 ); Run and play. You will see the following screen-cuts: All Rights Reserved 55/123

56 Figure Program first run All Rights Reserved 56/123

57 Figure Map Image Copied to the Right All Rights Reserved 57/123

58 Figure Click on Open Street Map and Mouse Over One Marker 3.6 Directions Service Create a Windows Forms Application project and name it DirectionsMap ; Rename Form1 to DirectionsForm; add a Tool Strip and four Tool Strip Buttons; name them as _toolstrip, _startovertoolstripbutton, _removeautoroutetoolstripbutton, _removecustomizedroutetoolstripbutton and _autodisplaytoolstripbutton; Add Map and name it as _map; set Dock to Fill; GUI looks as Figure 3.6.1; All Rights Reserved 58/123

59 Figure Directions Map GUI Design Code the following source code: using System; using System.Drawing; using System.Linq; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.Directions; using Gds.GoogleMap.Ultimate.Directions.Request; using Gds.GoogleMap.Ultimate.Directions.Results; All Rights Reserved 59/123

60 using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; using Gds.GoogleMap.Ultimate.Styles; namespace GdsGoogleMapUltimateSamples public partial class DirectionsForm : Form private TextPinLayer _dirmarkerlayer; private PolylineLayer _dirpolylinelayer; private readonly Timer _timer; public DirectionsForm() InitializeComponent(); _timer = new Timer Enabled = false, Interval = 500, ; _timer.tick += OnTimerTick; _map.mapinitialized += OnMapInitialized; _map.directionsservice.directionsservicecompleted += OnDirectionsServiceCompleted; _startovertoolstripbutton.click += OnStartOverToolStripButtonClick; _removeautoroutetoolstripbutton.click += OnRemoveAutoRouteToolStripButtonClick; _removecustomizedroutetoolstripbutton.click += OnRemoveCustomizedRouteToolStripButtonClick; _autodisplaytoolstripbutton.click += OnAutoDisplayToolStripButtonClick; private void OnTimerTick( object sender, EventArgs e ) _timer.enabled = false; var dirreq2 = new DirectionsRequest Origin = new LatLngLocation( , ), All Rights Reserved 60/123

61 ; Destination = new LatLngLocation( , ), TravelMode = TravelModeOption.Driving, _map.directionsservice.begindirectionsservice( dirreq2 ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _dirmarkerlayer = _map.featurelayercollection.addtextpinlayer( "RouteMarkerLayer" ); _dirpolylinelayer = _map.featurelayercollection.addpolylinelayer( "RoutePolylineLayer" ); var displaysettings = _dirpolylinelayer.displaysettings; displaysettings.style = new LineDashStyle( DashStyleOption.Solid ); displaysettings.strokeweight = 12; displaysettings.strokeopacity = 0.6; _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.directionsservice.autodisplayrouteenable = _autodisplaytoolstripbutton.text.equals( "Auto Display" ); var dirreq1 = new DirectionsRequest Origin = new AddressLocation( "963 Queensland Drive SE, Calgary, AB Canada" ), Destination = new AddressLocation( "55 Midpark Rise SE, Calgary, AB, Canada" ), TravelMode = TravelModeOption.Driving, ; _map.directionsservice.begindirectionsservice( dirreq1 ); _timer.enabled = true; catch ( Exception ex ) Text = ex.message; private void OnDirectionsServiceCompleted( object sender, DirectionsServiceCompletedEventArgs e ) if ( e.status!= DirectionsStatusOption.Ok ) All Rights Reserved 61/123

62 return; foreach ( var route in e.result.routecollection ) foreach ( var leg in route.legcollection ) var stmk = new TextPin( leg.startlocation.lat, leg.startlocation.lng, leg.startaddress, "Start" ); _dirmarkerlayer.collection.add( stmk, DisplayModeOption.Normal, new TextPinDisplaySettings ScaleFactor = 1.0, new TextPinDisplaySettings ScaleFactor = 1.0 ); foreach ( var step in leg.stepcollection ) var pl = new Polyline( step.path.tolist() ); _dirpolylinelayer.collection.add( pl ); var edmk = new TextPin( leg.endlocation.lat, leg.endlocation.lng, leg.endaddress, "End" ); _dirmarkerlayer.collection.add( edmk, DisplayModeOption.Normal, new TextPinDisplaySettings FillColor = Color.Green, ScaleFactor = 1.0, new TextPinDisplaySettings ScaleFactor = 1.0 ); All Rights Reserved 62/123

63 catch ( Exception ex ) Text = ex.message; private void OnStartOverToolStripButtonClick( object sender, EventArgs e ) _dirmarkerlayer.collection.removeall(); _dirpolylinelayer.collection.removeall(); _dirmarkerlayer = null; _dirpolylinelayer = null; _map.startover(); catch ( Exception ex ) Text = ex.message; private void OnRemoveAutoRouteToolStripButtonClick( object sender, EventArgs e ) _map.directionsservice.removeallautodisplayedroutes(); catch ( Exception ex ) Text = ex.message; private void OnRemoveCustomizedRouteToolStripButtonClick( object sender, EventArgs e ) _dirmarkerlayer.collection.removeall(); _dirpolylinelayer.collection.removeall(); catch ( Exception ex ) Text = ex.message; All Rights Reserved 63/123

64 private void OnAutoDisplayToolStripButtonClick( object sender, EventArgs e ) if ( _autodisplaytoolstripbutton.text.equals( "Auto Display" ) ) _autodisplaytoolstripbutton.text = "Not Auto Display"; _map.directionsservice.autodisplayrouteenable = false; else _autodisplaytoolstripbutton.text = "Auto Display"; _map.directionsservice.autodisplayrouteenable = true; catch ( Exception ex ) Text = ex.message; Run and play; you will see the following screen-cuts: All Rights Reserved 64/123

65 Figure Directions Map All Rights Reserved 65/123

66 Figure Mouse over end marker of a customized route after removing auto routes All Rights Reserved 66/123

67 Figure Mouse click on A marker of an auto route after removing customized routes 3.7 Autocomplete Find Address Map Create a Windows Forms Application project and name it FindAddressMap ; Drag Map onto the Form, name it as _map and set Dock to Fill; All Rights Reserved 67/123

68 3.7.3 Run the program; then enter University of Calgary in the text box, then use auto-complete to select the full address, then you will see the address is found and displayed as the Figure 3.7.1; Figure Autocomplete find address 3.8 Autocomplete Find Route Map and Driving Instructions Create a Windows Forms Application project and name it RouteInstructionsMap ; Rename Form1 to RouteInstructionsForm and then create the GUI as Figure 3.81.; All Rights Reserved 68/123

69 Figure Route Instructions Map GUI Design Code as followings: using System; using System.Drawing; using System.Linq; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.Directions; using Gds.GoogleMap.Ultimate.Directions.Request; using Gds.GoogleMap.Ultimate.Directions.Results; All Rights Reserved 69/123

70 using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; using Gds.GoogleMap.Ultimate.Styles; namespace GdsGoogleMapUltimateSamples public partial class DirectionsForm : Form private TextPinLayer _dirmarkerlayer; private PolylineLayer _dirpolylinelayer; private readonly Timer _timer; public DirectionsForm() InitializeComponent(); _timer = new Timer Enabled = false, Interval = 500, ; _timer.tick += OnTimerTick; _map.mapinitialized += OnMapInitialized; _map.directionsservice.directionsservicecompleted += OnDirectionsServiceCompleted; _startovertoolstripbutton.click += OnStartOverToolStripButtonClick; _removeautoroutetoolstripbutton.click += OnRemoveAutoRouteToolStripButtonClick; _removecustomizedroutetoolstripbutton.click += OnRemoveCustomizedRouteToolStripButtonClick; _autodisplaytoolstripbutton.click += OnAutoDisplayToolStripButtonClick; private void OnTimerTick( object sender, EventArgs e ) _timer.enabled = false; var dirreq2 = new DirectionsRequest Origin = new LatLngLocation( , ), All Rights Reserved 70/123

71 ; Destination = new LatLngLocation( , ), TravelMode = TravelModeOption.Driving, _map.directionsservice.begindirectionsservice( dirreq2 ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _dirmarkerlayer = _map.featurelayercollection.addtextpinlayer( "RouteMarkerLayer" ); _dirpolylinelayer = _map.featurelayercollection.addpolylinelayer( "RoutePolylineLayer" ); var displaysettings = _dirpolylinelayer.displaysettings; displaysettings.style = new LineDashStyle( DashStyleOption.Solid ); displaysettings.strokeweight = 12; displaysettings.strokeopacity = 0.6; _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.directionsservice.autodisplayrouteenable = _autodisplaytoolstripbutton.text.equals( "Auto Display" ); var dirreq1 = new DirectionsRequest Origin = new AddressLocation( "963 Queensland Drive SE, Calgary, AB Canada" ), Destination = new AddressLocation( "55 Midpark Rise SE, Calgary, AB, Canada" ), TravelMode = TravelModeOption.Driving, ; _map.directionsservice.begindirectionsservice( dirreq1 ); _timer.enabled = true; catch ( Exception ex ) Text = ex.message; private void OnDirectionsServiceCompleted( object sender, DirectionsServiceCompletedEventArgs e ) if ( e.status!= DirectionsStatusOption.Ok ) All Rights Reserved 71/123

72 return; foreach ( var route in e.result.routecollection ) foreach ( var leg in route.legcollection ) var stmk = new TextPin( leg.startlocation.lat, leg.startlocation.lng, leg.startaddress, "Start" ); _dirmarkerlayer.collection.add( stmk, DisplayModeOption.Normal, new TextPinDisplaySettings ScaleFactor = 1.0, new TextPinDisplaySettings ScaleFactor = 1.0 ); foreach ( var step in leg.stepcollection ) var pl = new Polyline( step.path.tolist() ); _dirpolylinelayer.collection.add( pl ); var edmk = new TextPin( leg.endlocation.lat, leg.endlocation.lng, leg.endaddress, "End" ); _dirmarkerlayer.collection.add( edmk, DisplayModeOption.Normal, new TextPinDisplaySettings FillColor = Color.Green, ScaleFactor = 1.0, new TextPinDisplaySettings ScaleFactor = 1.0 ); All Rights Reserved 72/123

73 catch ( Exception ex ) Text = ex.message; private void OnStartOverToolStripButtonClick( object sender, EventArgs e ) _dirmarkerlayer.collection.removeall(); _dirpolylinelayer.collection.removeall(); _dirmarkerlayer = null; _dirpolylinelayer = null; _map.startover(); catch ( Exception ex ) Text = ex.message; private void OnRemoveAutoRouteToolStripButtonClick( object sender, EventArgs e ) _map.directionsservice.removeallautodisplayedroutes(); catch ( Exception ex ) Text = ex.message; private void OnRemoveCustomizedRouteToolStripButtonClick( object sender, EventArgs e ) _dirmarkerlayer.collection.removeall(); _dirpolylinelayer.collection.removeall(); catch ( Exception ex ) Text = ex.message; All Rights Reserved 73/123

74 private void OnAutoDisplayToolStripButtonClick( object sender, EventArgs e ) if ( _autodisplaytoolstripbutton.text.equals( "Auto Display" ) ) _autodisplaytoolstripbutton.text = "Not Auto Display"; _map.directionsservice.autodisplayrouteenable = false; else _autodisplaytoolstripbutton.text = "Auto Display"; _map.directionsservice.autodisplayrouteenable = true; catch ( Exception ex ) Text = ex.message; Run the program and then input the start and end addresses, then click Find ; you will see the route is found and displayed on the map as well as the driving instructions in Figure 3.8.2; All Rights Reserved 74/123

75 Figure Autocomplete Found Route and Driving Instructions Please note that the driving instruction in the result of directions service from Google is HTML format. You will have to remove those tags if you don t want that format. All Rights Reserved 75/123

76 3.9 Heatmaps Map Create a Windows Forms Application project and name it HeatmapsMap ; Rename the Form1 to HeatmapsForm and create the GUI as Figure 3.9.1; Figure Heatmaps Map GUI Design Code as followings: using System; using System.Collections.Generic; All Rights Reserved 76/123

77 using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.GoogleData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class HeatmapsForm : Form private HeatmapLayer _heatmaplayer; private bool _toggle; public HeatmapsForm() InitializeComponent(); _toggle = false; _map.mapinitialized += OnMapInitialized; _visiblecheckbox.click += OnVisibleCheckBoxClick; _togglebutton.click += OnToggleButtonClick; _addheatmapbutton.click += OnAddHeatmapButtonClick; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _heatmaplayer = _map.featurelayercollection.addheatmaplayer( "HeatmapLayer" ); var wlatlngs = new List<WeightedLatLng> new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ) ; _heatmaplayer.collection.add( new Heatmap( wlatlngs ) ); All Rights Reserved 77/123

78 _visiblecheckbox.checked = _heatmaplayer.visible; catch ( Exception ex ) Text = ex.message; private void OnVisibleCheckBoxClick( object sender, EventArgs e ) _heatmaplayer.visible = _visiblecheckbox.checked; catch ( Exception ex ) Text = ex.message; private void OnToggleButtonClick( object sender, EventArgs e ) if ( _toggle ) _toggle = false; _heatmaplayer.displaysettings = new HeatmapDisplaySettings(); else _toggle = true; var displaysettings = new HeatmapDisplaySettings Opacity = 0.8, Radius = 40, ; displaysettings.gradient.add( new Rgba( 0, 255, 255, 0.0 ) ); displaysettings.gradient.add( new Rgba( 0, 255, 255, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 191, 255, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 127, 255, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 63, 255, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 0, 255, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 0, 223, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 0, 191, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 0, 159, 1.0 ) ); displaysettings.gradient.add( new Rgba( 0, 0, 127, 1.0 ) ); displaysettings.gradient.add( new Rgba( 63, 0, 91, 1.0 ) ); All Rights Reserved 78/123

79 displaysettings.gradient.add( new Rgba( 127, 0, 63, 1.0 ) ); displaysettings.gradient.add( new Rgba( 191, 0, 31, 1.0 ) ); displaysettings.gradient.add( new Rgba( 255, 0, 0, 1.0 ) ); _heatmaplayer.displaysettings = displaysettings; catch ( Exception ex ) Text = ex.message; private void OnAddHeatmapButtonClick( object sender, EventArgs e ) _addheatmapbutton.enabled = false; var wlatlngs = new List<WeightedLatLng> new WeightedLatLng( , , 2 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), new WeightedLatLng( , , 1 ), ; _heatmaplayer.collection.add( new Heatmap( wlatlngs ) ); catch ( Exception ex ) Text = ex.message; Run the program and you will see: All Rights Reserved 79/123

80 Figure Heatmaps Map Program First Run All Rights Reserved 80/123

81 Figure Heatmaps Map after clicking Toggle Display Settings and then Add Heatmap buttons 3.10 Mouse Events Map Create a Windows Forms Application project and name it MouseEventsMap ; Rename the Form1 to MouseEventsForm; drag and drop Map to the form, name it as _map and set its Dock property to Fill ; All Rights Reserved 81/123

82 Code as followings: using System; using System.Collections.Generic; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.FeatureLayers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class MouseEventsForm : Form private PolygonLayer _polygonlayer; private PolylineLayer _tmppolylinelayer; private DotPinLayer _tmpmarkerlayer; private List<LatLng> _latlngs; public MouseEventsForm() InitializeComponent(); _latlngs = new List<LatLng>(); _map.mapinitialized += OnMapInitialized; _map.mapmouseclick += OnMapMouseClick; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _polygonlayer = _map.featurelayercollection.addpolygonlayer( "Polygon Layer" ); _tmppolylinelayer = _map.featurelayercollection.addpolylinelayer( "Polyline Layer" ); _tmpmarkerlayer = _map.featurelayercollection.adddotpinlayer( "Maker Layer" ); catch ( Exception ex ) All Rights Reserved 82/123

83 Text = ex.message; private void OnMapMouseClick( object sender, MapMouseClickEventArgs e ) switch ( e.button ) case MapMouseButtonOption.Left: if ( _latlngs.count <= 0 ) _latlngs.add( e.location ); _tmpmarkerlayer.collection.add( new DotPin( e.location.lat, e.location.lng, " " ) ); else _latlngs.add( e.location ); _tmpmarkerlayer.collection.add( new DotPin( e.location.lat, e.location.lng, " " ) ); break; var latlnglst = new List<LatLng> new LatLng( _latlngs[ _latlngs.count -2 ] ), new LatLng( _latlngs[ _latlngs.count -1 ] ), ; _tmppolylinelayer.collection.add( new Polyline( latlnglst ) ); case MapMouseButtonOption.Right: _polygonlayer.collection.add( new Polygon( _latlngs ) ); _latlngs = new List<LatLng>(); _tmpmarkerlayer.collection.removeall(); _tmppolylinelayer.collection.removeall(); break; All Rights Reserved 83/123

84 catch ( Exception ex ) Text = ex.message; Run the program and do couple mouse left clicks to create vertices of a polygon as Figure ; Figure Add Vertices to Polygon All Rights Reserved 84/123

85 Do a mouse right click to end the edition so a polygon will be drawn as Figure Figure New Polygon is added on the map 3.11 Elevations Map Create a Windows Forms Application project and name it ElevationsMap ; Rename Form1 to ElevationsForm; create the GUI as Figure ; All Rights Reserved 85/123

86 Figure Elevations Map GUI Design Code as followings: using System; using System.Windows.Forms; using Gds.GoogleMap.Ultimate; using Gds.GoogleMap.Ultimate.Elevation; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; All Rights Reserved 86/123

87 namespace GdsGoogleMapUltimateSamples public partial class ElevationsForm : Form private readonly Timer _timer; public ElevationsForm() InitializeComponent(); _timer = new Timer Interval = 3000, Enabled = false ; _timer.tick += OnTimerTick; _map.mapinitialized += OnMapInitialized; _map.elevationservice.elevationservicecompleted += OnElevationServiceCompleted; private void UpdateMessage( string message ) _listbox.items.add( message ); private void OnTimerTick( object sender, EventArgs e ) _timer.enabled = false; UpdateMessage( "Path Elevation" ); var pathrequest = new PathElevationRequest(); pathrequest.pathcollection.add( new LatLng( , ) ); pathrequest.pathcollection.add( new LatLng( , ) ); pathrequest.pathcollection.add( new LatLng( , ) ); pathrequest.pathcollection.add( new LatLng( , ) ); pathrequest.pathcollection.add( new LatLng( 36.34, ) ); pathrequest.pathcollection.add( new LatLng( 36.24, ) ); pathrequest.samplecount = 256; _map.elevationservice.beginelevationservice( pathrequest ); catch ( Exception ex ) Text = ex.message; All Rights Reserved 87/123

88 private void OnMapInitialized( object sender, MapInitializedEventArgs e ) UpdateMessage( "Location Elevation" ); _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _map.mapcenter = new LatLng( , ); _map.maptypeid = MapTypeIdOption.Terrain; var locationrequest = new LocationElevationRequest(); locationrequest.locationcollection.add( new LatLng( , ) ); locationrequest.locationcollection.add( new LatLng( , ) ); _map.elevationservice.beginelevationservice( locationrequest ); _timer.enabled = true; catch ( Exception ex ) Text = ex.message; private void OnElevationServiceCompleted( object sender, ElevationServiceCompletedEventArgs e ) if ( e.status!= ElevationStatusOption.Ok ) UpdateMessage( "Failed to get elevation" ); foreach ( var result in e.results ) var elevationstr = ( result.elevation == null? "N/A" : ( ( double ) result.elevation ).ToString( "0.00" ) ); var resolutionstr = ( result.resolution == null? "N/A" : ( ( double ) result.resolution ).ToString( "0.00" ) ); UpdateMessage( "(" + result.location.lat.tostring( " " ) + ", " + result.location.lng.tostring( " " ) + ") Elevation: " + elevationstr + " Resolution: " + resolutionstr ); All Rights Reserved 88/123

89 Compile, run and play to see the following screen cut: Figure Elevations Map Program first run 3.12 Geome Map Create a Windows Forms Application project and name it GeomeMap ; All Rights Reserved 89/123

90 Rename Form1 to GeomeForm; add one Table Layout Panel (_tablelayoutpanel) and one List Box (_listbox); Add Map and name it as _map; Code as followings: using System; using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.Features; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class GeomeForm : Form private Polygon _polygon; public GeomeForm() InitializeComponent(); _map.mapinitialized += OnMapInitialized; _map.mapmouseclick += OnMapMouseClick; _map.mappolygonmouseclick += OnMapPolygonMouseClick; private void CheckLocation( LatLng latlng ) var str = _map.geomeservice.containslocation( latlng, _polygon )? "You click inside the Polygon!" : "You click outside the Polygon!"; MessageBox.Show( str ); catch ( Exception ex ) Text = ex.message; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) All Rights Reserved 90/123

91 _map.mapzoom = 3; _map.mapcenter = new LatLng( 34, ); var markerlayer = _map.featurelayercollection.addcharpinlayer( "Marker Layer" ); markerlayer.collection.add( new CharPin( , , "", "A" ), DisplayModeOption.Normal, new CharPinDisplaySettings FillColor = Color.Orange,, new CharPinDisplaySettings() ); markerlayer.collection.add( new CharPin( , 2.352, "", "B" ), DisplayModeOption.Normal, new CharPinDisplaySettings FillColor = Color.LightGreen,, new CharPinDisplaySettings() ); var polylinelayer = _map.featurelayercollection.addpolylinelayer( "Polyline Layer" ); var lst = new List<LatLng> new LatLng( , ), new LatLng( , ) ; polylinelayer.collection.add( new Polyline( lst ), DisplayModeOption.Normal, new PolylineDisplaySettings StrokeColor = Color.Blue, StrokeWeight = 4,, new PolylineDisplaySettings() ); _listbox.items.add( "Origin: (" + lst [ 0 ].Lat + ", " + lst [ 0 ].Lng + ")" ); All Rights Reserved 91/123

92 _listbox.items.add( "Destination: (" + lst [ 1 ].Lat + ", " + lst [ 1 ].Lng + ")" ); _listbox.items.add( "Heading: " + _map.geomeservice.computeheading( lst [ 0 ], lst [ 1 ] ).ToString( "0.00" ) + " (deg)" ); _listbox.items.add( "Distance: " + _map.geomeservice.computedistancebetween( lst [ 0 ], lst [ 1 ] ).ToString( "0.00" ) + " (m)" ); var polygonlayer = _map.featurelayercollection.addpolygonlayer( "Polygon Layer" ); var latlngs = new List<LatLng> new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), ; _polygon = new Polygon( latlngs ); polygonlayer.collection.add( _polygon ); catch ( Exception ex ) Text = ex.message; private void OnMapMouseClick( object sender, MapMouseClickEventArgs e ) CheckLocation( e.location ); private void OnMapPolygonMouseClick( object sender, MapPolygonMouseClickEventArgs e ) CheckLocation( e.location ); Compile and run to see the following screen cut: All Rights Reserved 92/123

93 Figure Compute heading and distance between two locations Mouse click inside and outside the polygon, you will see message boxes popup as Figure and Figure All Rights Reserved 93/123

94 Figure Mouse click inside the Polygon All Rights Reserved 94/123

95 Figure Mouse click outside the Polygon 3.13 Places Map Create a Windows Forms Application project and name it PlacesMap ; Rename Form1 to PlacesForm, add Map, name it as _map and set Dock to Fill ; Code as followings: using System; using System.Collections.Generic; All Rights Reserved 95/123

96 using System.Drawing; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; using Gds.GoogleMap.Ultimate.Places; using Gds.GoogleMap.Ultimate.Places.Result; using Gds.GoogleMap.Ultimate.Places.Search; using Gds.GoogleMap.Ultimate.Places.Search.NearbySearch; using Gds.GoogleMap.Ultimate.Places.Search.RadarSearch; using Gds.GoogleMap.Ultimate.Places.Search.TextSearch; namespace GdsGoogleMapUltimateSamples public partial class PlacesForm : Form private enum SearchTypeOption Idle, Nearby, Radar, Text, private SearchTypeOption _searchtype; private readonly NearbySearchLocationRadiusRequest _nearbyrequest; private readonly RadarSearchLocationRadiusRequest _radarrequest; private readonly TextSearchLocationRadiusRequest _textrequest; private readonly Timer _timer; private CharPinLayer _markerlayer; public PlacesForm() InitializeComponent(); _nearbyrequest = new NearbySearchLocationRadiusRequest Location = new LatLng( , ), Keyword = "park", Radius = 500, ; All Rights Reserved 96/123

97 _radarrequest = new RadarSearchLocationRadiusRequest Location = new LatLng( , ), Radius = 500, Types = new List<PlaceTypeOption> PlaceTypeOption.CarRental ; _textrequest = new TextSearchLocationRadiusRequest Location = new LatLng( , ), Query = "Travel", Radius = 500, ; _timer = new Timer Interval = 2500, Enabled = false, ; _timer.tick += OnTimerTick; _map.mapinitialized += OnMapInitialized; _map.mapcharpinmousemove += OnMapCharPinMouseMove; _map.mapcharpinmouseleave += OnMapCharPinMouseLeave; _map.mapcharpinmouseclick += OnMapCharPinMouseClick; _map.placesservice.placesearchservicecompleted += OnPlaceSearchServiceCompleted; _map.placesservice.placedetailsservicecompleted += OnPlaceDetailsServiceCompleted; private void OnTimerTick( object sender, EventArgs e ) switch ( _searchtype ) case SearchTypeOption.Nearby: _searchtype = SearchTypeOption.Radar; _map.placesservice.beginplacessearchservice( _radarrequest ); _timer.enabled = true; break; case SearchTypeOption.Radar: _searchtype = SearchTypeOption.Text; _map.placesservice.beginplacessearchservice( _textrequest ); _timer.enabled = true; break; All Rights Reserved 97/123

98 case SearchTypeOption.Text: _searchtype = SearchTypeOption.Idle; _timer.enabled = false; break; default: _timer.enabled = false; break; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 16; _markerlayer = _map.featurelayercollection.addcharpinlayer( "Result" ); _searchtype = SearchTypeOption.Nearby; _map.placesservice.beginplacessearchservice( _nearbyrequest ); _timer.enabled = true; private void OnPlaceSearchServiceCompleted( object sender, PlaceSearchServiceCompletedEventArgs e ) if ( e.status!= PlaceServiceStatusOption.Ok ) return; switch ( _searchtype ) case SearchTypeOption.Nearby: var ds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.Yellow ; var hds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.LightGreen, ; All Rights Reserved 98/123

99 foreach ( var result in e.results ) _markerlayer.collection.add( new CharPin( result.geome.location.lat, result.geome.location.lng, result.name, "N" ), DisplayModeOption.Normal, ds, hds ); break; case SearchTypeOption.Radar: var ds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.Orange ; var hds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.LightGreen, ; foreach ( var result in e.results ) _markerlayer.collection.add( new CharPin( result.geome.location.lat, result.geome.location.lng, result.placeid, "R" ), DisplayModeOption.Normal, ds, hds ); break; case SearchTypeOption.Text: var ds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.Pink ; var hds = new CharPinDisplaySettings CharColor = Color.DarkBlue, FillColor = Color.LightGreen, ; foreach ( var result in e.results ) _markerlayer.collection.add( new CharPin( result.geome.location.lat, All Rights Reserved 99/123

100 break; result.geome.location.lng, result.name, "T" ), DisplayModeOption.Normal, ds, hds ); private void OnMapCharPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _markerlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); private void OnMapCharPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _markerlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); private void OnPlaceDetailsServiceCompleted( object sender, PlaceDetailsServiceCompletedEventArgs e ) if ( e.status!= PlaceServiceStatusOption.Ok ) return; MessageBox.Show( e.result.formattedaddress ); private void OnMapCharPinMouseClick( object sender, MapMarkerMouseClickEventArgs e ) var charpin = _markerlayer.collection [ e.markerindex ] as CharPin; if ( charpin == null ) return; if ( charpin.char!= "R" ) MessageBox.Show( "Only Radar Search can perform details request!" ); return; var pdrequest = new PlaceDetailsRequest All Rights Reserved 100/123

101 ; PlaceId = charpin.description _map.placesservice.beginplacedetailsservice( pdrequest ); Compile and run to see the following screen cuts: Figure Search results displayed as markers on the map All Rights Reserved 101/123

102 Figure Description shows up when user hovers mouse over a marker All Rights Reserved 102/123

103 Figure Message Box of Place Details when clicking on marker from Radar Search 3.14 Multithread Map Create a Windows Forms Application project and name it MultithreadMap ; Rename Form1 to MultithreadForm, addd Map, name it as _map and set Dock to Fill ; Code as followings: using System; using System.Drawing; All Rights Reserved 103/123

104 using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace GdsGoogleMapUltimateSamples public partial class MultithreadForm : Form private delegate void AddMarkersDelegate(); private readonly AddMarkersDelegate _addmarker; private DotPinLayer _dotpinlayer; private IconPinLayer _iconpinlayer; private TextPinLayer _textpinlayer; private readonly CancellationTokenSource _cancel; private readonly Task _task; public MultithreadForm() InitializeComponent(); _addmarker = AddMarkers; _map.mapinitialized += OnMapInitialized; _map.mapdotpinmousemove += OnMapDotPinMouseMove; _map.mapdotpinmouseleave += OnMapDotPinMouseLeave; _map.mapiconpinmousemove += OnMapIconPinMouseMove; _map.mapiconpinmouseleave += OnMapIconPinMouseLeave; _map.maptextpinmousemove += OnMapTextPinMouseMove; _map.maptextpinmouseleave += OnMapTextPinMouseLeave; FormClosing += MultithreadFormFormClosingEventHandler; _cancel = new CancellationTokenSource(); _task = new Task( Task, _cancel.token ); All Rights Reserved 104/123

105 private void OnMapDotPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); private void OnMapDotPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); private void OnMapTextPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); private void OnMapTextPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); private void OnMapIconPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _iconpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); private void OnMapIconPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _iconpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); private void AddMarkers() _dotpinlayer.collection.add( new DotPin( , , "RBC Bank\r\nBridlewood Shopping Centre\r\n th St SW, Calgary, AB\r\nPhone: (403) \r\nTransit #180" ) ); All Rights Reserved 105/123

106 _iconpinlayer.collection.add( new IconPin( , , "RBC Bank\r\nGates Of Walden\r\n151 Walden Gate SE, Calgary, AB\r\nPhone: (403) \r\nTransit #1436", IconPinOption.BankDollar ) ); _textpinlayer.collection.add( new TextPin( , , "RBC Bank\r\nDeer Valley Market Place\r\n1221 Canyon Meadows Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #629", "RBC" ), DisplayModeOption.Normal, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8,, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8, FillColor = Color.Yellow, ); _iconpinlayer.collection.add( new IconPin( , , "RBC Bank\r\nBonavista\r\n755 Lake Bonavista Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #9099", IconPinOption.BankIntl ), DisplayModeOption.Normal, new IconPinDisplaySettings PinStyle = PinStyleOption.Star, new IconPinDisplaySettings PinStyle = PinStyleOption.Star, FillColor = Color.Green, ); _iconpinlayer.collection.add( new IconPin( , , "Moving Taxi", IconPinOption.Taxi ) ); private void Task() // simulate long background process All Rights Reserved 106/123

107 var st = DateTime.Now; while(! _cancel.iscancellationrequested ) Thread.Sleep( 20 ); var et = DateTime.Now; if ( ( et - st ).TotalSeconds > 30 ) break; if (! _cancel.iscancellationrequested && IsHandleCreated ) BeginInvoke( _addmarker ); private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _map.maptypecontrolenable = false; _dotpinlayer = _map.featurelayercollection.adddotpinlayer( "DotPinLayer" ); _iconpinlayer = _map.featurelayercollection.addiconpinlayer( "IconPinLayer" ); _textpinlayer = _map.featurelayercollection.addtextpinlayer( "TextPinLayer" ); _task.start(); catch ( Exception ex ) Text = ex.message; private void MultithreadFormFormClosingEventHandler( object sender, FormClosingEventArgs e ) _cancel.cancel(); All Rights Reserved 107/123

108 Compile and run the program; Figure Multithread Map First Run Wait 30 seconds and then you will see markers show up on the map; All Rights Reserved 108/123

109 Figure Markers added to the map from non-ui thread Mouse mover over a marker to see it is highlighted and description show up. All Rights Reserved 109/123

110 Figure Marker is highlighted and description is shown 3.15 WPF Map Create a WPF Application project and name it WpfMap ; Modify MainWindow.xaml as following: <Window x:class="wpfmap.mainwindow" xmlns=" xmlns:x=" Title="WPF Map" Height="650" Width="900"> All Rights Reserved 110/123

111 <Grid> <WindowsFormsHost Name="_windowsFormsHost" /> </Grid> </Window> Code as followings: using System; using System.Drawing; using System.Windows; using Gds.GoogleMap.Ultimate; using Gds.GoogleMap.Ultimate.DisplaySettings; using Gds.GoogleMap.Ultimate.DisplaySettings.Markers; using Gds.GoogleMap.Ultimate.FeatureLayers.MarkerLayers; using Gds.GoogleMap.Ultimate.Features.Markers; using Gds.GoogleMap.Ultimate.GeoData; using Gds.GoogleMap.Ultimate.MapEvents; namespace WpfMap /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window private readonly Map _map; private DotPinLayer _dotpinlayer; private IconPinLayer _iconpinlayer; private TextPinLayer _textpinlayer; public MainWindow() InitializeComponent(); _map = new Map GdsGoogleMapLicenseKey = "Your License Key" ; _windowsformshost.child = _map; _map.mapinitialized += OnMapInitialized; _map.mapdotpinmousemove += OnMapDotPinMouseMove; _map.mapdotpinmouseleave += OnMapDotPinMouseLeave; _map.mapiconpinmousemove += OnMapIconPinMouseMove; _map.mapiconpinmouseleave += OnMapIconPinMouseLeave; All Rights Reserved 111/123

112 _map.maptextpinmousemove += OnMapTextPinMouseMove; _map.maptextpinmouseleave += OnMapTextPinMouseLeave; private void OnMapInitialized( object sender, MapInitializedEventArgs e ) _map.mapcenter = new LatLng( , ); _map.mapzoom = 12; _map.autocompleteservice.findaddressenable = false; _map.autocompleteservice.drawfoundaddressenable = false; _map.maptypecontrolenable = false; _dotpinlayer = _map.featurelayercollection.adddotpinlayer( "DotPinLayer" ); _iconpinlayer = _map.featurelayercollection.addiconpinlayer( "IconPinLayer" ); _textpinlayer = _map.featurelayercollection.addtextpinlayer( "TextPinLayer" ); _dotpinlayer.collection.add( new DotPin( , , "RBC Bank\r\nBridlewood Shopping Centre\r\n th St SW, Calgary, AB\r\nPhone: (403) \r\nTransit #180" ) ); _iconpinlayer.collection.add( new IconPin( , , "RBC Bank\r\nGates Of Walden\r\n151 Walden Gate SE, Calgary, AB\r\nPhone: (403) \r\nTransit #1436", IconPinOption.BankDollar ) ); _iconpinlayer.collection.add( new IconPin( , , "RBC Bank\r\nBonavista\r\n755 Lake Bonavista Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #9099", IconPinOption.BankIntl ), DisplayModeOption.Normal, new IconPinDisplaySettings PinStyle = PinStyleOption.Star All Rights Reserved 112/123

113 , new IconPinDisplaySettings PinStyle = PinStyleOption.Star, FillColor = Color.LightGreen, ); _iconpinlayer.collection.add( new IconPin( , , "Moving Taxi", IconPinOption.Taxi ) ); _textpinlayer.collection.add( new TextPin( , , "RBC Bank\r\nDeer Valley Market Place\r\n1221 Canyon Meadows Dr SE, Calgary, AB\r\nPhone: (403) \r\nTransit #629", "RBC" ), DisplayModeOption.Normal, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8,, new TextPinDisplaySettings FontSize = 9, ScaleFactor = 0.8, FillColor = Color.Yellow, ); catch ( Exception ex ) Title = ex.message; private void OnMapDotPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex,displaymodeopt ion.highlight ); catch ( Exception ex ) Title = ex.message; All Rights Reserved 113/123

114 private void OnMapDotPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _dotpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch ( Exception ex ) Title = ex.message; private void OnMapIconPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _iconpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); catch ( Exception ex ) Title = ex.message; private void OnMapIconPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _iconpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch ( Exception ex ) Title = ex.message; private void OnMapTextPinMouseMove( object sender, MapMarkerMouseMoveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Highlight ); catch ( Exception ex ) All Rights Reserved 114/123

115 Title = ex.message; private void OnMapTextPinMouseLeave( object sender, MapMarkerMouseLeaveEventArgs e ) _textpinlayer.collection.setdisplaymode( e.markerindex, DisplayModeOption.Normal ); catch ( Exception ex ) Title = ex.message; Compile and run the program: All Rights Reserved 115/123

116 Figure WPF Map First Run Highlight a maker and show its description: All Rights Reserved 116/123

117 Figure Highlighted marker and its description All Rights Reserved 117/123

IBSDK Quick Start Tutorial for C# 2010

IBSDK Quick Start Tutorial for C# 2010 IB-SDK-00003 Ver. 3.0.0 2012-04-04 IBSDK Quick Start Tutorial for C# 2010 Copyright @2012, lntegrated Biometrics LLC. All Rights Reserved 1 QuickStart Project C# 2010 Example Follow these steps to setup

More information

You can call the project anything you like I will be calling this one project slide show.

You can call the project anything you like I will be calling this one project slide show. C# Tutorial Load all images from a folder Slide Show In this tutorial we will see how to create a C# slide show where you load everything from a single folder and view them through a timer. This exercise

More information

Chapter 12. Tool Strips, Status Strips, and Splitters

Chapter 12. Tool Strips, Status Strips, and Splitters Chapter 12 Tool Strips, Status Strips, and Splitters Tool Strips Usually called tool bars. The new ToolStrip class replaces the older ToolBar class of.net 1.1. Create easily customized, commonly employed

More information

Dive Into Visual C# 2008 Express

Dive Into Visual C# 2008 Express 1 2 2 Dive Into Visual C# 2008 Express OBJECTIVES In this chapter you will learn: The basics of the Visual Studio Integrated Development Environment (IDE) that assists you in writing, running and debugging

More information

CALCULATOR APPLICATION

CALCULATOR APPLICATION CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;

More information

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at: This document describes how to create a simple Windows Forms Application using some Open Core Interface functions in C# with Microsoft Visual Studio Express 2013. 1 Preconditions The Open Core Interface

More information

Form Properties Window

Form Properties Window C# Tutorial Create a Save The Eggs Item Drop Game in Visual Studio Start Visual Studio, Start a new project. Under the C# language, choose Windows Form Application. Name the project savetheeggs and click

More information

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox] C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open

More information

Developing for Mobile Devices Lab (Part 1 of 2)

Developing for Mobile Devices Lab (Part 1 of 2) Developing for Mobile Devices Lab (Part 1 of 2) Overview Through these two lab sessions you will learn how to create mobile applications for Windows Mobile phones and PDAs. As developing for Windows Mobile

More information

Click on the empty form and apply the following options to the properties Windows.

Click on the empty form and apply the following options to the properties Windows. Start New Project In Visual Studio Choose C# Windows Form Application Name it SpaceInvaders and Click OK. Click on the empty form and apply the following options to the properties Windows. This is the

More information

Database Systems Lab. 19. Google Maps API 충남대학교컴퓨터공학과 데이타베이스시스템연구실

Database Systems Lab. 19. Google Maps API 충남대학교컴퓨터공학과 데이타베이스시스템연구실 데이타베이스시스템연구실 Database Systems Lab. 19. Google Maps API 충남대학교컴퓨터공학과 데이타베이스시스템연구실 Google Maps API Tutorial What is Google Maps? Allows you to display maps on your web site Google Maps API Google Maps API

More information

Quick Guide for the ServoWorks.NET API 2010/7/13

Quick Guide for the ServoWorks.NET API 2010/7/13 Quick Guide for the ServoWorks.NET API 2010/7/13 This document will guide you through creating a simple sample application that jogs axis 1 in a single direction using Soft Servo Systems ServoWorks.NET

More information

Step 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content

Step 1: Start a GUI Project. Start->New Project->Visual C# ->Windows Forms Application. Name: Wack-A-Gopher. Step 2: Add Content Step 1: Start a GUI Project Start->New Project->Visual C# ->Windows Forms Application Name: Wack-A-Gopher Step 2: Add Content Download the Content folder (content.zip) from Canvas and unzip in a location

More information

CSIS 1624 CLASS TEST 6

CSIS 1624 CLASS TEST 6 CSIS 1624 CLASS TEST 6 Instructions: Use visual studio 2012/2013 Make sure your work is saved correctly Submit your work as instructed by the demmies. This is an open-book test. You may consult the printed

More information

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear. 4 Programming with C#.NET 1 Camera The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear. Begin by loading Microsoft Visual Studio

More information

CIS 3260 Intro. to Programming with C#

CIS 3260 Intro. to Programming with C# Running Your First Program in Visual C# 2008 McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Run Visual Studio Start a New Project Select File/New/Project Visual C# and Windows must

More information

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer C# Tutorial Create a Motivational Quotes Viewer Application in Visual Studio In this tutorial we will create a fun little application for Microsoft Windows using Visual Studio. You can use any version

More information

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock. C# Tutorial - Create a YouTube Alarm Clock in Visual Studio In this tutorial we will create a simple yet elegant YouTube alarm clock in Visual Studio using C# programming language. The main idea for this

More information

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them. We are working on Visual Studio 2010 but this project can be remade in any other version of visual studio. Start a new project in Visual Studio, make this a C# Windows Form Application and name it zombieshooter.

More information

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer.. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;

More information

Conventions in this tutorial

Conventions in this tutorial This document provides an exercise using Digi JumpStart for Windows Embedded CE 6.0. This document shows how to develop, run, and debug a simple application on your target hardware platform. This tutorial

More information

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK. Before you start - download the game assets from above or on MOOICT.COM to

More information

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming Introduction to the Visual Studio.NET Integrated Development Environment IDE CSC 211 Intermediate Programming Visual Studio.NET Integrated Development Environment (IDE) The Start Page(Fig. 1) Helpful links

More information

Class Test 5. Create a simple paint program that conforms to the following requirements.

Class Test 5. Create a simple paint program that conforms to the following requirements. Class Test 5 Question 1 Use visual studio 2012 ultimate to create a C# windows forms application. Create a simple paint program that conforms to the following requirements. The control box is disabled

More information

Create your own Meme Maker in C#

Create your own Meme Maker in C# Create your own Meme Maker in C# This tutorial will show how to create a meme maker in visual studio 2010 using C#. Now we are using Visual Studio 2010 version you can use any and still get the same result.

More information

Filtering - Zimbra

Filtering  - Zimbra Filtering Email - Zimbra Email filtering allows you to definite rules to manage incoming email. For instance, you may apply a filter on incoming email to route particular emails into folders or delete

More information

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

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide Contents Create your First Test... 3 Standalone Web Test... 3 Standalone WPF Test... 6 Standalone Silverlight Test... 8 Visual Studio Plug-In

More information

Visual C# Program: Simple Game 3

Visual C# Program: Simple Game 3 C h a p t e r 6C Visual C# Program: Simple Game 3 In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Opening Visual C# Editor Beginning a

More information

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime

Visual Studio.NET.NET Framework. Web Services Web Forms Windows Forms. Data and XML classes. Framework Base Classes. Common Language Runtime Intro C# Intro C# 1 Microsoft's.NET platform and Framework.NET Enterprise Servers Visual Studio.NET.NET Framework.NET Building Block Services Operating system on servers, desktop, and devices Web Services

More information

Lab 12-1 Lab Kofax Capture Import Connector -- XML

Lab 12-1 Lab Kofax Capture Import Connector -- XML In the following lab instructions, you are going to configure using Kofax Capture Import Connector -- XML (KCIC XML) to import documents into Kofax Capture. An XML file will provide the information for

More information

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project.

We are going to use some graphics and found a nice little batman running GIF, off course you can use any image you want for the project. C# Tutorial - Create a Batman Gravity Run Game Start a new project in visual studio and call it gravityrun It should be a windows form application with C# Click OK Change the size of the to 800,300 and

More information

Developing a Simple Mapping Application with the GeoBase SDK and NAVTEQ data Tutorial 2 Adding Satellite Imagery

Developing a Simple Mapping Application with the GeoBase SDK and NAVTEQ data Tutorial 2 Adding Satellite Imagery Telogis Phone: (866) 835-6447 Fax: (866) 422-4096 1 Technology Dr., I-829 Irvine, California 92618 www.telogis.com Leading Global Platform for Location Based Services Developing a Simple Mapping Application

More information

HTML5 and CSS3 JavaScript Advanced Features Page 1

HTML5 and CSS3 JavaScript Advanced Features Page 1 HTML5 and CSS3 JavaScript Advanced Features Page 1 1 HTML5 and CSS3 JAVASCRIPT ADVANCED FEATURES 2 3 4 5 6 Geolocation The HTML5 Geolocation API is used to get the geographical position of a user Most

More information

Excel window. This will open the Tools menu. Select. from this list, Figure 3. This will launch a window that

Excel window. This will open the Tools menu. Select. from this list, Figure 3. This will launch a window that Getting Started with the Superpave Calculator worksheet. The worksheet containing the Superpave macros must be copied onto the computer. The user can place the worksheet in any desired directory or folder.

More information

USER MANUAL. Quick Maps TABLE OF CONTENTS. Version: 1.0

USER MANUAL. Quick Maps TABLE OF CONTENTS. Version: 1.0 USER MANUAL Quick Maps Version: 1.0 Compatibility: Microsoft Dynamics CRM 2016(v8.0) and above TABLE OF CONTENTS Introduction... 2 Benefits of Quick Maps... 2 Prerequisites... 2 Installation & Configuration...

More information

Start Visual Studio, create a new project called Helicopter Game and press OK

Start Visual Studio, create a new project called Helicopter Game and press OK C# Tutorial Create a helicopter flying and shooting game in visual studio In this tutorial we will create a fun little helicopter game in visual studio. You will be flying the helicopter which can shoot

More information

FLUID DESIGNER FOR 3D PRINTING Installing & Configuring Startup Screen

FLUID DESIGNER FOR 3D PRINTING Installing & Configuring Startup Screen FLUID DESIGNER FOR 3D PRINTING Installing & Configuring Startup Screen INSTALLING THE APPLICATION After downloading the file FluidDesigner3DPrinting.Zip from our web site you should install it in either

More information

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

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide Automation Design Canvas 2.0 Beta Quick-Start Guide Contents Creating and Running Your First Test... 3 Adding Quick Verification Steps... 10 Creating Advanced Test Verifications... 13 Creating a Data Driven

More information

Google Earth Tutorial 1: The Basics of Map-making in Google Earth 6.2

Google Earth Tutorial 1: The Basics of Map-making in Google Earth 6.2 Google Earth Tutorial 1: The Basics of Map-making in Google Earth 6.2 University of Waterloo Map Library, 2012 Part 1: Placemarks 1. Locating a Geographical Area a. Open up Google Earth. b. In the Search

More information

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

for ArcSketch Version 1.1 ArcSketch is a sample extension to ArcGIS. It works with ArcGIS 9.1 ArcSketch User Guide for ArcSketch Version 1.1 ArcSketch is a sample extension to ArcGIS. It works with ArcGIS 9.1 ArcSketch allows the user to quickly create, or sketch, features in ArcMap using easy-to-use

More information

Appendix A Programkod

Appendix A Programkod Appendix A Programkod ProgramForm.cs using System; using System.Text; using System.Windows.Forms; using System.Net; using System.IO; using System.Text.RegularExpressions; using System.Collections.Generic;

More information

Outlook Quick Start Guide

Outlook Quick Start Guide Getting Started Outlook 2013 Quick Start Guide File Tab: Click to access actions like Print, Save As, etc. Also to set Outlook Options. Quick Access Toolbar: Add your mostused tool buttons to this customizable

More information

Table of contents. DMXzone Google Maps 2 DMXzone

Table of contents. DMXzone Google Maps 2 DMXzone Table of contents Table of contents... 1 About... 2 Features in Detail... 3 The Basics: Inserting Google Maps on a Page... 20 Advanced: Control Google Maps with Behaviors... 27 Advanced: Track Your Current

More information

EL-USB-RT API Guide V1.0

EL-USB-RT API Guide V1.0 EL-USB-RT API Guide V1.0 Contents 1 Introduction 2 C++ Sample Dialog Application 3 C++ Sample Observer Pattern Application 4 C# Sample Application 4.1 Capturing USB Device Connect \ Disconnect Events 5

More information

Developing for Mobile Devices Lab (Part 2 of 2)

Developing for Mobile Devices Lab (Part 2 of 2) Developing for Mobile Devices Lab (Part 2 of 2) Overview In the previous lab you learned how to create desktop and mobile applications using Visual Studio. Two important features that were not covered

More information

GraphWorX64 Productivity Tips

GraphWorX64 Productivity Tips Description: Overview of the most important productivity tools in GraphWorX64 General Requirement: Basic knowledge of GraphWorX64. Introduction GraphWorX64 has a very powerful development environment in

More information

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

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011 Hands-On Lab Lab: Client Object Model Lab version: 1.0.0 Last updated: 2/23/2011 CONTENTS OVERVIEW... 3 EXERCISE 1: RETRIEVING LISTS... 4 EXERCISE 2: PRINTING A LIST... 8 EXERCISE 3: USING ADO.NET DATA

More information

Creating a new CDC policy using the Database Administration Console

Creating a new CDC policy using the Database Administration Console Creating a new CDC policy using the Database Administration Console When you start Progress Developer Studio for OpenEdge for the first time, you need to specify a workspace location. A workspace is a

More information

Starting Visual Studio 2005

Starting Visual Studio 2005 Starting Visual Studio 2005 1 Startup Language 1. Select Language 2. Start Visual Studio If this is your first time starting VS2005 after installation, you will probably see this screen. It is asking you

More information

Agresso Unit 4 Business World. File Options & User Setup

Agresso Unit 4 Business World. File Options & User Setup Agresso Unit 4 Business World File Options & User Setup Author SJ Price - June 2018 Contents M7 Agresso File Options, User Set-Up and Screen Navigation... 3 More About the Menu pane... 5 Are some screens

More information

National Weather Map

National Weather Map Weather Map Objectives Each student will utilize the Google Docs drawing application to create a map using common weather map symbols that show the current state of the weather in the United States. Benchmarks

More information

NI USB-TC01 Thermocouple Measurement Device

NI USB-TC01 Thermocouple Measurement Device Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics NI USB-TC01 Thermocouple Measurement Device HANS- PETTER HALVORSEN, 2013.02.18 Faculty of Technology,

More information

Writing Your First Autodesk Revit Model Review Plug-In

Writing Your First Autodesk Revit Model Review Plug-In Writing Your First Autodesk Revit Model Review Plug-In R. Robert Bell Sparling CP5880 The Revit Model Review plug-in is a great tool for checking a Revit model for matching the standards your company has

More information

SAP Business Client Quick Start Guide

SAP Business Client Quick Start Guide SAP Business Client Quick Start Guide This guide introduces the SAP Business Client, how to navigate and use basic features. SAP Business Client 6.5 integrates SAP 7.50 GUI. It s now possible to use both

More information

DataPro Quick Start Guide

DataPro Quick Start Guide DataPro Quick Start Guide Introduction The DataPro application provides the user with the ability to download and analyze data acquired using the ULTRA-LITE PRO range of Auto Meter products. Please see

More information

Military Icons User Guide Version 1.0

Military Icons User Guide Version 1.0 Military Icons User Guide Version 1.0 Copyright 2008 Mobiform Software, Inc. 1 Table of Contents Introduction... 3 Dependency Properties... 4 Enumerable Values... 5 Usage... 7 Using Military Icon with

More information

Programming in C# Project 1:

Programming in C# Project 1: Programming in C# Project 1: Set the text in the Form s title bar. Change the Form s background color. Place a Label control on the Form. Display text in a Label control. Place a PictureBox control on

More information

StyleGuard for Outlook

StyleGuard for Outlook StyleGuard for Outlook Table of Contents Introduction... 2 Microsoft Office Compatibility... 3 Installation... 3 Verifying the StyleGuard for Outlook Installation... 6 Activating a StyleGuard Style Collection...

More information

Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D.

Chapter 2. Ans. C (p. 55) 2. Which is not a control you can find in the Toolbox? A. Label B. PictureBox C. Properties Window D. Chapter 2 Multiple Choice 1. According to the following figure, which statement is incorrect? A. The size of the selected object is 300 pixels wide by 300 pixels high. B. The name of the select object

More information

INTRODUCTION TO VISUAL BASIC 2010

INTRODUCTION TO VISUAL BASIC 2010 INTRODUCTION TO VISUAL BASIC 2010 Microsoft Visual Basic is a set of programming tools that allows you to create applications for the Windows operating system. With Visual Basic, even a beginner can create

More information

COGCC GIS Online Map Instructions - Internet Site April 10, 2018

COGCC GIS Online Map Instructions - Internet Site April 10, 2018 COGCC GIS Online Map Instructions - Internet Site April 10, 2018 Table of Contents Page Section Page Section 1 Introduction 8 Clear Selection 2 Double Click 8 Buffer 3 Arrow Tip Information 9 Select within

More information

Using the Xcode Debugger

Using the Xcode Debugger g Using the Xcode Debugger J Objectives In this appendix you ll: Set breakpoints and run a program in the debugger. Use the Continue program execution command to continue execution. Use the Auto window

More information

BASIC NAVIGATION & VIEWS...

BASIC NAVIGATION & VIEWS... Content Overview VISUAL TOUR... 5 NEW FEATURES IN OUTLOOK 2010... 6 BASIC NAVIGATION & VIEWS... 7 SETTING PREFERENCES... 7 Creating an Outlook Shortcut... 7 Choosing a Startup View... 7 CUSTOMIZING INBOX

More information

Your First Windows Form

Your First Windows Form Your First Windows Form From now on, we re going to be creating Windows Forms Applications, rather than Console Applications. Windows Forms Applications make use of something called a Form. The Form is

More information

Reading: Managing Files in Windows 7

Reading: Managing Files in Windows 7 Student Resource 13.4b Reading: Managing Files in Windows 7 Directions: All recent versions of Windows (XP, Vista, Windows 7) have fairly similar ways of managing files, but their graphic user interfaces

More information

In-Class Worksheet #4

In-Class Worksheet #4 CSE 459.24 Programming in C# Richard Kidwell In-Class Worksheet #4 Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open. 1. Create a new Project either from the

More information

Iconasys Advanced 360 Product View Creator. User Guide (Mac OSX)

Iconasys Advanced 360 Product View Creator. User Guide (Mac OSX) Iconasys Advanced 360 Product View Creator User Guide (Mac OSX) Overview 360 Product View Creator UI 1. Upload Image Area 2. Image Viewing Gallery 3. Output Format and Button Create 4. 360 Preview Window

More information

ATNS. USING Google EARTH. Version 1

ATNS. USING Google EARTH. Version 1 ATNS USING Google EARTH Version 1 ATNS/HO/Using Google Earth Page 1 25/04/2013 CONTENTS 1. BASIC SETUP 2. NAVIGATING IN GOOGLE EARTH 3. ADDING OBJECTS TO GOOGLE EARTH 4. USER HELP REFERENCES ATNS/HO/Using

More information

Software User's Guide

Software User's Guide Software User's Guide Brother QL-series The contents of this guide and the specifications of this product are subject to change without notice. Brother reserves the right to make changes without notice

More information

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below. APPENDIX 1 TABLE DETAILS Mainly three tables namely Teacher, Student and Class for small database of a school are used. The snapshots of all three tables are shown below. Details of Class table are shown

More information

Getting Started. Microsoft QUICK Source 7

Getting Started. Microsoft QUICK Source 7 Microsoft QUICK Windows Source 7 Getting Started The Windows 7 Desktop u v w x u Icon links to a program, file, or folder that is stored on the desktop. v Shortcut Icon links to a program, file, or folder

More information

Quickest way to transfer leads into your Microsoft Excel Work Sheet

Quickest way to transfer  leads into your Microsoft Excel Work Sheet Quickest way to transfer email leads into your Microsoft Excel Work Sheet Quick Start Guide Takes only a few minutes to read 1340 S. De Anza Blvd., Suite #106 San Jose, CA 95129 Phone: (408) 872-3103 Fax:

More information

Overview Describe the structure of a Windows Forms application Introduce deployment over networks

Overview Describe the structure of a Windows Forms application Introduce deployment over networks Windows Forms Overview Describe the structure of a Windows Forms application application entry point forms components and controls Introduce deployment over networks 2 Windows Forms Windows Forms are classes

More information

Terratype Umbraco Multi map provider

Terratype Umbraco Multi map provider Terratype Umbraco Multi map provider Installation Installing via Nuget This Umbraco package can be installed via Nuget The first part is the Terratype framework, which coordinates the different map providers,

More information

VERSION JANUARY 19, 2015 TEST STUDIO QUICK-START GUIDE STANDALONE & VISUAL STUDIO PLUG-IN TELERIK A PROGRESS COMPANY

VERSION JANUARY 19, 2015 TEST STUDIO QUICK-START GUIDE STANDALONE & VISUAL STUDIO PLUG-IN TELERIK A PROGRESS COMPANY VERSION 2015.1 JANUARY 19, 2015 TEST STUDIO QUICK-START GUIDE STANDALONE & VISUAL STUDIO PLUG-IN TELERIK A PROGRESS COMPANY TEST STUDIO QUICK-START GUIDE CONTENTS Create your First Test.2 Standalone Web

More information

A MASHUP TECHNOLOGY WITH GOOGLEMAPS AND.NET FRAMEWORK

A MASHUP TECHNOLOGY WITH GOOGLEMAPS AND.NET FRAMEWORK A MASHUP TECHNOLOGY WITH GOOGLEMAPS AND.NET FRAMEWORK 1 Terumalasetti Sailaja, 2 Jalgama Ramesh, 3 D.Rajya Lakhsmi 1 Dept. of CSE, UCE-JNTUK Vizianagaram, 2 HPS-ACS, Honeywell Technology Solutions Email

More information

Status Bar: Right click on the Status Bar to add or remove features.

Status Bar: Right click on the Status Bar to add or remove features. Outlook 2010 Quick Start Guide Getting Started File Tab: Click to access actions like Print, Save As, etc. Also to set Outlook options. Ribbon: Logically organizes Command Buttons onto Tabs and Groups

More information

Using Template Bookmarks for Automating Microsoft Word Reports

Using Template Bookmarks for Automating Microsoft Word Reports Using Template Bookmarks for Automating Microsoft Word Reports Darryl Bryk U.S. Army RDECOM-TARDEC Warren, MI 48397 Disclaimer: Reference herein to any specific commercial company, product, process, or

More information

To create a notebook on desktop version 1. Open One Note 2. File > New. o FILE. Options

To create a notebook on desktop version 1. Open One Note 2. File > New. o FILE. Options OneNote Training When you open OneNote for the first time there will be notebooks already started and you can see them on the left hand side. There is an introduction section that you can go through, if

More information

Zend Studio 3.0. Quick Start Guide

Zend Studio 3.0. Quick Start Guide Zend Studio 3.0 This walks you through the Zend Studio 3.0 major features, helping you to get a general knowledge on the most important capabilities of the application. A more complete Information Center

More information

Pelnor Help Add-in.

Pelnor Help Add-in. Pelnor Help Add-in http://www.pelnor.com/ Pelnor Software Index HelpAddIn 1 Pelnor Help Add-in UserControl... 1 Node Editor...7 URL Link Dialog...10 Inner Document Link Selection Dialog... 11 Help Document

More information

Tutorial for Importing Open Green Map Sites into Google Earth

Tutorial for Importing Open Green Map Sites into Google Earth Tutorial for Importing Open Green Map Sites into Google Earth Step 1. Download your Open Green Map data files by logging in on Open Green Map and viewing your map(s). Choose the Import/Export tab over

More information

InspectionWare. Quick Start Guide. Version: QSG-BC-rev1.5

InspectionWare. Quick Start Guide. Version: QSG-BC-rev1.5 Quick Start Guide InspectionWare Version: QSG-BC-rev1.5 Quick Start Guide introduces the basic components of the InspectionWare NDE Development Platform and helps you to get started using a C-Scan example.

More information

Chapter 8 Advanced GUI Features

Chapter 8 Advanced GUI Features 159 Chapter 8 Advanced GUI Features There are many other features we can easily add to a Windows C# application. We must be able to have menus and dialogs along with many other controls. One workhorse

More information

Google My Maps. What can you do with My Maps? Check out some info from Google: https://www.google.com.au/maps/about/mymaps/

Google My Maps. What can you do with My Maps? Check out some info from Google: https://www.google.com.au/maps/about/mymaps/ Google My Maps What can you do with My Maps? Check out some info from Google: https://www.google.com.au/maps/about/mymaps/ Explore the EZEC map: https://drive.google.com/open?id=153_82bl_wypwbt5wn8ebvqfoxgs&usp=sharing

More information

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Experiment 5 : Creating a Windows application to interface with 7-Segment LED display Objectives : 1) To understand the how Windows Forms in the Windows-based applications. 2) To create a Window Application

More information

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Eyes of the Dragon - XNA Part 37 Map Editor Revisited Eyes of the Dragon - XNA Part 37 Map Editor Revisited I'm writing these tutorials for the XNA 4.0 framework. Even though Microsoft has ended support for XNA it still runs on all supported operating systems

More information

User Guide 701P Wide Format Solution Wide Format Scan Service

User Guide 701P Wide Format Solution Wide Format Scan Service User Guide 701P44865 6204 Wide Format Solution Wide Format Scan Service Xerox Corporation Global Knowledge & Language Services 800 Phillips Road Bldg. 845-17S Webster, NY 14580 Copyright 2006 Xerox Corporation.

More information

Introduction to the MODx Manager

Introduction to the MODx Manager Introduction to the MODx Manager To login to your site's Manager: Go to your school s website, then add /manager/ ex. http://alamosa.k12.co.us/school/manager/ Enter your username and password, then click

More information

Skinning Manual v1.0. Skinning Example

Skinning Manual v1.0. Skinning Example Skinning Manual v1.0 Introduction Centroid Skinning, available in CNC11 v3.15 r24+ for Mill and Lathe, allows developers to create their own front-end or skin for their application. Skinning allows developers

More information

CHAPTER 3. Writing Windows C# Programs. Objects in C#

CHAPTER 3. Writing Windows C# Programs. Objects in C# 90 01 pp. 001-09 r5ah.ps 8/1/0 :5 PM Page 9 CHAPTER 3 Writing Windows C# Programs 5 9 Objects in C# The C# language has its roots in C++, Visual Basic, and Java. Both C# and VB.Net use the same libraries

More information

Colleague UI4.3 Documentation

Colleague UI4.3 Documentation Colleague UI4.3 Documentation Table of Contents Getting Started... 2 Add the Shortcuts to your Desktop... 2 Searching for and Using Forms... 3 Begin Your Form Search... 3 Form Search Results... 3 The Navigation

More information

Software User's Guide

Software User's Guide Software User's Guide The contents of this guide and the specifications of this product are subject to change without notice. Brother reserves the right to make changes without notice in the specifications

More information

Don t jump ahead, there is more you need to do first in order for this to work properly.

Don t jump ahead, there is more you need to do first in order for this to work properly. With the release of our new PD 502 & PD 602 portable terminals, you are required to use CPS v5.06.01.009 programming software. To maintain compatibility between the different DMR model radios, you will

More information

Quick Start - WPF. Chapter 4. Table of Contents

Quick Start - WPF. Chapter 4. Table of Contents Chapter 4 Quick Start - WPF Table of Contents Chapter 4... 4-1 Quick Start - WPF... 4-1 Using Haystack Generated Code in WPF... 4-2 Quick Start for WPF Applications... 4-2 Add New Haystack Project for

More information

USER GUIDE MADCAP CAPTURE 7. Getting Started

USER GUIDE MADCAP CAPTURE 7. Getting Started USER GUIDE MADCAP CAPTURE 7 Getting Started Copyright 2018 MadCap Software. All rights reserved. Information in this document is subject to change without notice. The software described in this document

More information

UNIT-3. Prepared by R.VINODINI 1

UNIT-3. Prepared by R.VINODINI 1 Prepared by R.VINODINI 1 Prepared by R.VINODINI 2 Prepared by R.VINODINI 3 Prepared by R.VINODINI 4 Prepared by R.VINODINI 5 o o o o Prepared by R.VINODINI 6 Prepared by R.VINODINI 7 Prepared by R.VINODINI

More information

PowerPoint X. 1. The Project Gallery window with the PowerPoint presentation icon already selected. 2. Click on OK.

PowerPoint X. 1. The Project Gallery window with the PowerPoint presentation icon already selected. 2. Click on OK. PowerPoint X Launching PowerPointX 1. Start PowerPointX by clicking on the PowerPoint icon in the dock or finding it in the hard drive in the Applications folder under Microsoft PowerPoint. PowerPoint

More information

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

Part I. Integrated Development Environment. Chapter 2: The Solution Explorer, Toolbox, and Properties. Chapter 3: Options and Customizations Part I Integrated Development Environment Chapter 1: A Quick Tour Chapter 2: The Solution Explorer, Toolbox, and Properties Chapter 3: Options and Customizations Chapter 4: Workspace Control Chapter 5:

More information

The walkthrough is available at /

The walkthrough is available at   / The walkthrough is available at https://downloads.openmicroscopy.org/presentations/2018/gbi-sydney / Description We will demonstrate a number of features of the OMERO platform using an OMERO server based

More information