MapScript C# Tutorial - Programming MapServer in the ASP .NET Framework(转)
link:
http://www.paolocorti.net/public/dokuwiki/doku.php?id=mapserver:tutorial
This tutorial will try to guide you step by step in implementing a GIS (Geographic Information Systems) web solution, based on Open Source software (MapServer and PostGIS), within the .NET Framework.
How to download the tutorial
The tutorial’s data needed to complete this tutorial are downloadable here. In any case the tutorial is made in a way that you can easily adapt to use your own data (shapefiles).
Here you can find a complete working Visual Studio 2003 solution (ASP .NET 1.1) with the whole tutorial’s solution.
Take a look at a working online demo of the tutorial
Before beginning following the tutorial’s steps you can take a look at a working online demo of it: try to navigate the map (zoom in, zoom out), identify features on the active layer, add features (and attributes) to a point layer (POI), restore (clear) the point layer where you have added the features, switch on/off layers visibility.
Tutorial's audience
The tutorial is designed to work with Visual Studio 2003 and .NET 1.1, but you will easily be able to perform all the necessary steps to complete it using another version of Visual Studio (ie: Visual Studio 2005) or other IDEs (like Visual Web Developer 2005 Express Edition or even the notepad). It will work also using .NET 2 as c# mapscript is .NET 2 compatible.
The tutorial is focused to people with knowledge of C# (but can be easily implemented with .NET Visual Basic) and the .NET framework, and with some background in GIS. If you are new to GIS, a good place to start is here: http://en.wikipedia.org/wiki/GIS.
This tutorial could be easily adapted for other languages and frameworks rather than C# (or VB) and Microsoft .NET Framewok. In fact the Open Source component we are going to use (MapServer) is also available for PHP, Java and Python, and other languages.
As we will implement a C# ASP .NET Application, take care about this issue (that should be solved in the future): MapServer thread safety? (http://mapserver.gis.umn.edu/docs/faq/thread_safety) and about plans to solve this issue (http://mapserver.gis.umn.edu/development/rfc/ms-rfc-15).
Tutorial's feedback
If you find something wrong in this tutorial, or if you would like to have some improvement about it write me a email or drop a comment on my blog on this web site.
I will try to give you an answer.
Tutorial Index
For completing the tutorial you will need to perform, with the suggested order, the following steps:
-
Adapting C# code to work indifferently with shapefile or PostGIS layers
technical blog: http://xiexiaokui.cnblogs.com
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?