This project is read-only.

Intro to DotSpatial

May 21, 2012 at 5:37 PM

Continuing the thread from http://mapwindow6.codeplex.com/discussions/356151

May 21, 2012 at 5:40 PM

1) How to get the source code for Dotspatial: Getting the DotSpatial Source Code

2) If the nuget package manager extension is not available, you are limited to the illustrated templates

3) Should I create an extension or an application?

Feel free to post further questions here.

May 21, 2012 at 7:53 PM

Hi mudnug, Thanks for setting up this new discussion (Intro to DotSpatial) in DotSpatial.Codeplex.Com.

I quickly read your 1), 2) and 3) and I have the following things needed to be clarified by you:

#1: I want to use my Visual C# 2010 Express to do DotSpatial by using your DotSpatial v1.2-Minimal that has been downloaded to my C:/TEMP/DotSpatial v1.2-Minimal folder already.  Q#1a:  Do I have to have "NetGet" downloaded and set up in my  Visual C# 2010 Express? Q#1b: Should I use the source code that is already in my C:/TEMP/DotSpatial v1.2-Minimal folder or the source code from TortoiseSVN?

 #2: I started a new project and I have "Recent Template/Installed Templates/Visual C#/Online Templates" on the left-hand side of the screen,  Window Forms Application/WPF Application,...,Empty Project in the middle of the screen, and Type Visual C# on the right-hand of the screen. (By the way, is it possible for me to attach a file with screen-shot in my post/thread of "Dicussions"? It is clumsy and hard to describe the screenshot in words on this post/thread.) Q#2a: Should I use Windows Forms Application to launch my DotSpatial project?  Q#2b: How can I select the Online Templates to do DotSpatial programming?

#3:  I am comfused and lost completely by this question: Should I create an extension or an application?

Please answer my above-mentioned questions and guide me to get on my first DotSpatial programming by using your DotSpatial v1.2-Minimal in my  Visual C# 2010 Express.

Thanks,

Scott Chang

May 21, 2012 at 9:53 PM

1,2) Keeping things simple: source is used to create binaries. Binaries run on your computer. I think you only have binaries in C:/TEMP/DotSpatial v1.2-Minimal. You can reference the binaries in an extension project. Since you have express you would want to get the project template from here. Then fix up the references using the dlls in C:/TEMP/DotSpatial v1.2-Minimal

I don't see a way to attach images except as links, so you can upload them to http://ge.tt/ first.

3) OK. Create an extension, then. You're on that track.

May 22, 2012 at 2:49 PM

Hi mudnug, Thank you very much for your nice response.

I launched a new project (un-named yet) in my Visual C# 2010 Express.  I clicked on Online Templates, then clicked on Templates:  Windows Forms.  I clicked on  DotSpatial Plugin Template to install it.  It tried to install, but it failed and gave me the following error message:  Microsoft Visual C# 2010:  This extension cannot be installed because the following references are missing: - NuGet Package Manager.  As you instructed, I saved the error message in http://www.ge.tt/3ffxQ1I/v/0 for you to see.  (1)  I used "NuGet" to do a "Google" search and read http://www.itbully.com/articles/nuget-package-management-net.  I tried to fix this "NuGet" problem in my new project (un-named) without luck - I did not see "NuGet.Tools.vsix" in my Visual C# 2010 Express!!??   Please tell me how to get NuGet Package Manager to my new project.  (2) In my new project, I see Typed: Visual C#; Created By: DotSpatial Team; Version: 1.0.0.14 on the right-hand side of the screen - see the last page of the linked http://www.ge.tt/3ffxQ1I/v/0. This vision 1.0.0.14 and your statement "Then fix up the references using the dlls in C:/TEMP/DotSpatial v1.2-Minimal" are difficult for me to do.  Please give me more tangible instructions of changing/fixing Version 1.0.0.14 to Version 1.2 Minimal to do my first DotSpatial programming in my Visual C# 2010 Express.   I will try to do your "Create an Extension to Import an Excel Worksheet" as my first DotSpatial project in my Visual C# 2010 Express.

Please help me and respond again.

Thanks,

Scott Chang

P. S.  I hope I did everything right in saving my "attached" files in http:/www.ge.tt/

May 22, 2012 at 5:26 PM

The images were available on ge.tt

 

You'll notice that your error is expected and described in How to Create an Extension. You can't add the NuGet Package Manager the last time I checked to the Express editions.

This is why you will have to start from a different template. I've added this template to the downloads section: Plugin Template (for VS express editions). Don't forget to unblock the zip before unzipping it.

May 22, 2012 at 7:20 PM

Hi mudnug,

1)  Tried to unblock the zip file of Plugin Template (for VS express editions): Right-click on the zip file, choose Properties, go to the general tab, but I do not see the unblock button - see http://ge.tt/5rMFU21/v/0.  How can I unblock the zip file of Plugin Template (for VS express editions)?

2)  I found the same problem (i.e. No Unblock Button) on the DotSpatial 1.2 Minimal.zip file - see the http://ge.tt/5rMFU21/v/0.

3)  One more strange thing to ask you:  Without knowing the "Unblock" thing, I downloaded the DotSpatial 1.2 Minimal.zip file and unziped it yesterday. Today, I just saw a folder "DotSpatialPluginTemplate_v10014-Mudnug_2Feb2012."  Is  the DotSpatial 1.2 Minimal.zip file = DotSpatialPluginTemplate? Thus, my first DotSpatial (un-named) project had Version 1.0.0.14 appeared on the right-hand side of the screen!!??  Please help me in clearing this strange thing I just saw.

Please respond again.

Thanks,

Scott Chang

May 22, 2012 at 9:01 PM

The link for no unblock button didn't work, but if you don't see the button, I wouldn't worry at this point. Go ahead and unzip the file, your OS/browser combination might not block files, so they should load ok.

I'm also not sure what the folder DotSpatialPluginTemplate_v10014-Mudnug_2Feb2012 would be.

Use the template to take the place of the one that is available online.

May 23, 2012 at 3:33 PM

Hi mudnug,

I am ready to do the following 2 things:

(1) I un-zipped the zip file of Plugin Template (for VS express editions) and saved them in my C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions.  How can I use the un-zipped file of Plugin Template (for VS express editions) to replace the existing template in my Visual C# 2010 Express? I have to ask you this question, because I do not understand what you mean by "Use the template to take the place of the one that is available online" in my new DotSpatial Project - see http://ge.et/6KYa05I/v/0.

(2) In the screen shot of my new DotSpatial Project (stored in http://ge.et/6KYa05I/v/0), the right-hand side has Type: Visual C#; Created By: DotSpatial Team; Version: 1.0.0.14. I have your DotSpatial v1.2-Minimal downloaded, un-zipped and saved in my C:\TEMP\DotSpatial-v1.2-Minimal folder.  How can I replace Version: 1.0.0.14 with the un-zipped files of DotSpatial-v1.2-Minimal I have now?

Please help me in dealing with (1) and (2) tasks for getting my first DotSpatial Programming project started in my Visual C# 2010 Express.

Please respond and give me the detailed instructions for (1) and (2).

Thanks,

Scott Chang

  

May 23, 2012 at 5:38 PM

No problem. Just double click the DotSpatial.Plugins.ProjectTemplate.csproj in C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions. You won't need DotSpatial-v1.2-Minimal because I already included it in the template I created for you.

May 23, 2012 at 7:02 PM

Hi mudnug,

As you instructed, I double clicked the DotSpatial.Plugins.ProjectTemplate.csproj in C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions.  It ran and I got "Something" from my Visual C# 2010 Express - see the second page of http://ge.tt/2zq0i5I/v/0.  I launched my Visual C# 2010 Express for my first DotSpatial Programming project and I got the same Online Templates: ....Windows Forms... on the left-hand side, DotSpatial Plugin Template on the middle, and Version:1.0.0.14 on the right-hand site of the un-named New Project like the first page of  http://ge.tt/2zq0i5I/v/0 (This first page was the one I posted in the last thread). If I clicked on the DotSpatial Plugin Template, it tried to install, but it gave me the same old error message: This extension cannot be installed because the following references are missing: -NuGet Package Manager (I thought this problem was resolved - you said if Plugin Template (for VS express editions) was used. Now I am completely lost in launching my first DotSpatial Programming project in my Visual C# 2010 Express.  Please help me and tell me what I should do to get to the right track in  launching my first DotSpatial Programming project in my Visual C# 2010 Express-Create an Extension to Import an Excel Worksheet (your tutorial project).

Thanks,

Scott Chang  

May 23, 2012 at 9:30 PM

I've reviewed your screenshots. Sorry this is taking so much effort for you.

 

You're not going to need to create a new project. The online template doesn't work in VS express, so just copy the  Plugin Template (for VS express editions) each time you want a new project. Then skip the "new project step" and use this copy by opening it. (File, Open... or double clicking the project file)

I'm not quite sure of the "something" that you're seeing (on page two of your upload) when you open the template. It almost looks perfect, but there is a missing AssemblyInfo.cs file. Perhaps your zip extraction utility removed the Properties folder. When the template is unzipped, AssemblyInfo.cs should be in the Properties folder.

Does this help?

 

If this continues to be a problem, I might recommend downloading the trial version of Visual Studio Pro (if that applies for you).

May 24, 2012 at 2:02 PM

Hi mudnug,

Please review http://ge.tt/4ysJ08I/v/0 I just made this morning.

1) AssemblyInfo.cs file is in the "something" that I'm seeing (on page one of my new upload) when I double clicked the DotSpatial.Plugins.ProjectTemplate.csproj in C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions.  This morning, I checked my C:\TEMP\DotSpatialPlugTemplateForVSexpresseditions folder and I saw AssemblyInfo.cs also. But AssemblyInfo.cs is not in the Properties folder. You are right on this matter.  Is anything you (or I) can do to resolve this problem? Is it possible for my Computer Team in our office not to remove the "content" of AssemblyInfo.cs file from the Properties folder, when I use the zip extraction utility? 

2) Is the  trial version of Visual Studio Pro applicable to my Visual C# 2010 Express?

Please respond again.

Thanks,

Scott Chang

May 24, 2012 at 5:59 PM

Let me focus on (1). You can create a Properites folder and put AssemblyInfo.cs in it. Or you can use the built-in unzip tool to extract the files a second time with the folder intact.

1.

Open My Computer, and then locate the compressed folder (zip file).

2.

Do one of the following:

To extract a single file or folder, double-click the compressed folder to open it. Then, drag the file or folder from the compressed folder to a new location.

To extract all files or folders, right-click the compressed folder, and then click Extract All. In the Compressed (zipped) Folders Extraction Wizard, specify where you want to store the extracted files.

May 24, 2012 at 9:09 PM

Hi mudnug,

I copied AssemblyInfo.cs from C:\TEMP\DotSpatialPlugTemplateForVSexpresseditions folder and I pasted that AssemblyInfo.cs in the Properties folder. Then I  double clicked the DotSpatial.Plugins.ProjectTemplate.csproj in C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions. I got a new "Thing" from my Visual C# 2010 Express - see the 1st and 2nd pages of http://ge.tt/2eJj09I/v/0 for details and tell me whether this new "Thing" is a right template for me to launch my first DotSpatial Programming project. If it is a right template, tell me how to launch my first DotSpatial Programming project using your "Create an Extension to Import an Excel Worksheet" and my data with X,Y Coordiates of 8 Points.  If it is not right, I may try the 2 "bullet" instructions you stated in your last response -  I am not 100% sure I understand the 2 "bullet" instructions, but I will try.

Please respond again.

Thanks,

Scott Chang

P. S. The 3rd and 4th pages  of http://ge.tt/2eJj09I/v/0 are the unzipped stuff I have, before I  double clicked the DotSpatial.Plugins.ProjectTemplate.csproj in C:\TEMP\DotSpatialPluginTemplateForVSexpresseditions.

May 24, 2012 at 10:37 PM

I'm getting a page not found error when I try to follow you link, but let me guess that everything is setup ok for you now.

In Visual Studio use the Menu Debug, Start Debugging ... to run the project.

May 29, 2012 at 2:20 PM

Hi mudnug, Thanks for your nice response. Sorry for my late response.

This morning, as you instructed I clicked on "Start Debugging" to run my "DotSpatialPlugin" project. It tried to run, DemoMap (with Extension) showed up, but my project stayed on "Running" all the time - see http://ge.tt/7g4mvKI/v/0 for details.  I don't know whether my project is running as it should or not.  Please review my screen shot in http://ge.tt/7g4mvKI/v/0 and tell me what it is going on in my "DotSpatialPlugin" project.  If it is working properly (I am not sure!!).  I really want to launch your tutorial "Getting Started with DotSpatial 1.0 Desktop Mapping" with the data of my 8-Point XY-coordinates. I need your help in getting familiar with your tutorial "Getting Started with DotSpatial 1.0 Desktop Mapping" too - how to copy it and how to add the data of my 8-Point XY-coordinates to your tutorial "Getting Started with DotSpatial 1.0 Desktop Mapping" manuelly.

Please help me and respond again.

Many Thanks,

Scott Chang

May 29, 2012 at 8:43 PM

The image you sent shows everything is working great!

For more information on how to add points to a point FeatureSet, check out Using PointSymbolizer on a DrawingLayer. You may need to experiment a bit, so feel free to make a copy of the template as you get started. You can always come back to the template (or a copy) for a fresh start.

May 30, 2012 at 7:47 PM

Hi mudnug,

Thank you very much for telling me the DotSpatial Plugin Template is working properly in my PC and I should check out Using PointSymbolizer on a DrawingLayer for how to add points to a point FeatureSet.

I studied your "Using PointSymbolizer on a DrawingLayer", "Getting Started with DotSpatial 1.0 Desktop Mapping", "Create an Extension to Import an Excel Worksheet" and "DotSpatial Plugin Template" hard for my first DotSpatial programming project.  I also reviewed 2 old DotSpatial projects that used DotSpatial-12-15-2010_dll_library developed by Ted D. before - see http://ge.tt/5gWUPI/v/0. After my efforts in studying the above-mentioned materials, I feel that  I am not able to lift myself to the level where I can do my first "mudnug-way" DotSpatial Programming project.  I have a set of XY-coordinates for 8 Points - see http://ge.tt/8wVnWPI/v/0 that will be used to create a DotSpatial project of "Create an Extension to Import an Excel Worksheet" in my Visual C# 2010 Express.  Please kindly help and give me more detailed instructions (or procedures) to get my "Create an Extension to Import an Excel Worksheet" and "Create a "Point" shapefile for the 8 Points, save the "8-Point" shapefile in my C:/TEMP folder, and show the "8-Point" map in the Form1 of Visual C# 2010 Express.

Please respond again.

Many Thanks,

Scott Chang