資源簡介
基于gmap和百度地圖API開發(fā)的GIS應用支持定位查詢,放大縮小,平移,抓取等功能基于gmap和百度地圖API開發(fā)的GIS應用支持定位查詢,放大縮小,平移,抓取等功能
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
using?System.Web;
namespace?MapManager
{
????public?class?BaiduAKSNCaculater
????{
????????private?static?string?MD5(string?password)
????????{
????????????try
????????????{
????????????????System.Security.Cryptography.HashAlgorithm?hash?=?System.Security.Cryptography.MD5.Create();
????????????????byte[]?hash_out?=?hash.ComputeHash(System.Text.Encoding.UTF8.GetBytes(password));
????????????????var?md5_str?=?BitConverter.ToString(hash_out).Replace(“-“?““);
????????????????return?md5_str.ToLower();
????????????}
????????????catch
????????????{
????????????????throw;
????????????}
????????}
????????private?static?string?UrlEncode(string?str)
????????{
????????????str?=?System.Web.HttpUtility.UrlEncode(str);
????????????byte[]?buf?=?Encoding.ASCII.GetBytes(str);//等同于Encoding.ASCII.GetBytes(str)
????????????for?(int?i?=?0;?i?????????????????if?(buf[i]?==?‘%‘)
????????????????{
????????????????????if?(buf[i?+?1]?>=?‘a(chǎn)‘)?buf[i?+?1]?-=?32;
????????????????????if?(buf[i?+?2]?>=?‘a(chǎn)‘)?buf[i?+?2]?-=?32;
????????????????????i?+=?2;
????????????????}
????????????return?Encoding.ASCII.GetString(buf);//同上,等同于Encoding.ASCII.GetString(buf)
????????}
????????private?static?string?HttpBuildQuery(IDictionary?querystring_arrays)
????????{
????????????StringBuilder?sb?=?new?StringBuilder();
????????????foreach?(var?item?in?querystring_arrays)
????????????{
????????????????sb.Append(UrlEncode(item.Key));
????????????????sb.Append(“=“);
????????????????sb.Append(UrlEncode(item.Value));
????????????????sb.Append(“&“);
????????????}
????????????sb.Remove(sb.Length?-?1?1);
????????????return?sb.ToString();
????????}
????????public?static?string?CaculateAKSN(string?ak?string?sk?string?url?IDictionary?querystring_arrays)
????????{
????????????var?queryString?=?HttpBuildQuery(querystring_arrays);
????????????var?str?=?UrlEncode(url?+?“?“?+?queryString?+?sk);
????????????return?MD5(str);
????????}
????}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-05-18?12:36??MapManager(Gmap)\
?????目錄???????????0??2020-05-18?12:27??MapManager(Gmap)\.vs\
?????目錄???????????0??2020-05-18?12:27??MapManager(Gmap)\.vs\MapManager\
?????目錄???????????0??2020-05-18?12:27??MapManager(Gmap)\.vs\MapManager\v16\
?????文件???????93184??2020-05-18?21:51??MapManager(Gmap)\.vs\MapManager\v16\.suo
?????目錄???????????0??2020-05-18?18:54??MapManager(Gmap)\MapManager\
?????文件????????2145??2020-05-18?17:39??MapManager(Gmap)\MapManager\AKSNCaculater.cs
?????文件?????????189??2020-05-18?12:27??MapManager(Gmap)\MapManager\App.config
?????文件?????????374??2020-05-18?12:27??MapManager(Gmap)\MapManager\App.xaml
?????文件?????????337??2020-05-18?12:27??MapManager(Gmap)\MapManager\App.xaml.cs
?????文件?????????226??2020-05-18?18:50??MapManager(Gmap)\MapManager\City.cs
?????文件????????2752??2020-05-18?17:49??MapManager(Gmap)\MapManager\Geo.cs
?????文件????????1061??2020-05-18?14:49??MapManager(Gmap)\MapManager\GetLatitudeAndLongtitude.cs
?????目錄???????????0??2020-05-18?13:23??MapManager(Gmap)\MapManager\Images\
?????文件?????????911??2020-05-18?13:22??MapManager(Gmap)\MapManager\Images\arrow_left.png
?????文件?????????882??2020-05-18?13:23??MapManager(Gmap)\MapManager\Images\arrow_right.png
?????文件????????2272??2020-05-18?13:20??MapManager(Gmap)\MapManager\Images\globe.png
?????文件????????1025??2020-05-18?13:18??MapManager(Gmap)\MapManager\Images\hand.png
?????文件????????1312??2020-05-18?13:12??MapManager(Gmap)\MapManager\Images\zoom_in.png
?????文件????????1235??2020-05-18?13:10??MapManager(Gmap)\MapManager\Images\zoom_out.png
?????文件????????3338??2020-05-18?18:43??MapManager(Gmap)\MapManager\MainWindow.xaml
?????文件????????7564??2020-05-18?18:54??MapManager(Gmap)\MapManager\MainWindow.xaml.cs
?????文件????????5866??2020-05-18?18:50??MapManager(Gmap)\MapManager\MapManager.csproj
?????文件?????????242??2020-05-18?12:45??MapManager(Gmap)\MapManager\Mapcontrol.cs
?????目錄???????????0??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\
?????文件????????2308??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\AssemblyInfo.cs
?????文件????????2833??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\Resources.Designer.cs
?????文件????????5612??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\Resources.resx
?????文件????????1097??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\Settings.Designer.cs
?????文件?????????201??2020-05-18?12:27??MapManager(Gmap)\MapManager\Properties\Settings.settings
?????文件?????????230??2020-05-18?18:43??MapManager(Gmap)\MapManager\Province.cs
............此處省略111個文件信息
評論
共有 條評論