利用WPF建立自己的3d gis软件(非axhost方式)(一)
原文:利用WPF建立自己的3d gis软件(非axhost方式)(一)
先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPew 密码:1te1
地图数据包(sqlserver2008R2版本,也可以不下载): https://pan.baidu.com/s/1PjcNamad7OVpCrsVJ7dwFQ 密码:uw9r
完整的视频演示:http://v.youku.com/v_show/id_XMTU4MTI5NTE4NA==.html
下载完成以后,解压出来,将30-1.exe 拖动到 把授权拖到我上面install.bat上完成授权安装。。。
设置system.ini 如下内容
Server=122.112.229.220
user=GisTest
Password=chinamtouch.com
该数据库中只提供 成都市火车南站附近的数据请注意,104.0648,30.61658
而且该公用服务器带宽不大,所以会有些卡顿,建议下载数据库后本地使用,下载后的数据库有些许变化,请联系博主修改一下
你下载了sql包。则设置为自己的设置。
下一步新建一个wpf工程。然后引用SDK中的gislib.dll,NewGisBiao.dll如下图:

下面上代码
<Window x:Class="Teach3DGIS.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Teach3DGIS"
mc:Ignorable="d"
Title="MainWindow" Height="768" Width="1024">
<Canvas x:Name="Root" Height="768" Width="1024">
</Canvas>
</Window>
MainWindow.cs
using GisLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Teach3DGIS
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
Init3D();
}
GisLib.MTGIS3D gis3d;
GisLib.MTGIS2 gis2d;
private void Init3D()
{
if (gis3d == null)
{
IniRead.IniReadWrite.BiaoManage = new NewGisBiao.Base.BiaoManage(Root);
gis3d = new MTGIS3D();
gis3d.TManage = IniRead.IniReadWrite.BiaoManage;
Root.Children.Add(gis3d);
Canvas.SetLeft(gis3d, 0);
Canvas.SetTop(gis3d, 0);
gis3d.Width = this.Width - 100;
gis3d.Height = this.Height - 100;
//高程数据目录及对象初始
// gis3d.WireLineSelect += Gis3d_WireLineSelect;
gis3d._HiMain = new GisLib.HiData.HiMang(AppDomain.CurrentDomain.BaseDirectory + "hidatatemp", "hi");
IniRead.IniReadWrite.MPareant = gis3d;
}
}
}
}
设置工程 输出目录为SDK所在目录如下图

然后运后就可以得到一个wpf版本的3dgis了:
由于是非axhost方式加入的,所以是完全支持WPF的特性的。我们可以将地图控件旋转一定角度:代码如下:
RotateTransform u1 = new RotateTransform();
u1.Angle = 45;
gis3d.RenderTransformOrigin = new Point(0.5, 0.5);
gis3d.RenderTransform = u1;
效果如下:
利用WPF建立自己的3d gis软件(非axhost方式)(一)的更多相关文章
- 利用WPF建立自己的3d gis软件(非axhost方式)(十二)SDK中的导航系统
原文:利用WPF建立自己的3d gis软件(非axhost方式)(十二)SDK中的导航系统 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPew ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(十三)万能的用户层接口,(强大的WPF)
原文:利用WPF建立自己的3d gis软件(非axhost方式)(十三)万能的用户层接口,(强大的WPF) 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(十一)SDK中的动画系统
原文:利用WPF建立自己的3d gis软件(非axhost方式)(十一)SDK中的动画系统 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPew ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(十)SDK中一些自带的展示面板应用
原文:利用WPF建立自己的3d gis软件(非axhost方式)(十)SDK中一些自带的展示面板应用 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(七)实现简单的粒子效果
原文:利用WPF建立自己的3d gis软件(非axhost方式)(七)实现简单的粒子效果 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPew密 ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(八)拖动一个UI到地球上
原文:利用WPF建立自己的3d gis软件(非axhost方式)(八)拖动一个UI到地球上 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPew ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(九)SDK自带部分面板的调用
原文:利用WPF建立自己的3d gis软件(非axhost方式)(九)SDK自带部分面板的调用 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bP ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(六)跳转,增加外部三维模型
原文:利用WPF建立自己的3d gis软件(非axhost方式)(六)跳转,增加外部三维模型 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bPe ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(五)在鼠标点击的位置增加UI
原文:利用WPF建立自己的3d gis软件(非axhost方式)(五)在鼠标点击的位置增加UI 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUwLfrt0zV0bP ...
- 利用WPF建立自己的3d gis软件(非axhost方式)(四)在地图上添加FrameworkElement
原文:利用WPF建立自己的3d gis软件(非axhost方式)(四)在地图上添加FrameworkElement 先下载SDK:https://pan.baidu.com/s/1M9kBS6ouUw ...
随机推荐
- DE1-SOC调试linux应用程序
参考http://www.alterawiki.com/wiki/SoCEDSGettingStarted#Getting_Started_with_Linux_Application_Debuggi ...
- 【例题 6-16 UVa 10129】Play on Words
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 入度减去出度个数为1的点和为-1的点各有1个,然后其他点入度减去出度为0 或者全都是入度为0的点即可. [代码] #include ...
- 使用MongoDb连接数据库服务器
链接MongoDb数据库服务器的字符串格式: mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN] ...
- 过滤input框中的特殊字符
两种方式,我觉得是一样的效果,请看: var charFilter1 = function(str) { var pattern = new RegExp("[`~!@#$^&*() ...
- ZOJ 1136 Longest Ordered Subsequence DP
传送门:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1136 题目大意:给定一串序列,求最长的升序列长度,如1, 7, 3, ...
- Xcode5新特性之注释
Xcode5新特性之注释 Xcode5在注释式文档方面也有进步,越来越象javadoc. Xcode4 参考一下教程 http://blog.chukong-inc.com/index.php/201 ...
- input常用输入框限制
input常用输入框限制 本篇 1.小写自动转换成大写: or 2.大写自动转换成小写 or 3.防止退后清空的TEXT文档 4.ENTER键可以让光标移到下一个输入框 5.只能为中文(有闪动) ...
- EChats+Ajax之柱状图的数据交互
原文链接:https://blog.csdn.net/qq_37936542/article/details/79723710 一:下载 echarts.min.js 选择完整版进行下载,精简版和常用 ...
- [Compose] 14. Build curried functions
We see what it means to curry a function, then walk through several examples of curried functions an ...
- 阿里巴巴fastjson的使用
一.项目结构 一个学生类.当中学生类中能够包括Course类对象 使用Maven管理项目的能够加入fastjson的坐标: <dependency> <groupId>com. ...