BaiduMapTileCutter/StepPanel4.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BaiduMapTileCutter
{
    [System.Runtime.InteropServices.ComVisibleAttribute(true)]
    public partial class StepPanel4 : UserControl
    {
        public StepPanel4()
        {
            InitializeComponent();
        }

        public void LoadPage()
        {
            string htmlString = "<!DOCTYPE html>"
                + "<html>"
                + "<head>"
                + "<meta charset=\"utf-8\">"
                + "<title>Get Point</title>"
                + "<script type=\"text/javascript\" src=\"http://api.map.baidu.com/api?v=1.2\"></script>"
                + "<style>"
                + "html, body {margin: 0;padding: 0;}"
                + "</style>"
                + "</head>"
                + "<body>"
                + "<div id=\"map\" style=\"width:492px;height:236px;background:#000;\"></div>"
                + "<script type=\"text/javascript\">"
                + "var map = new BMap.Map('map');"
                + "map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);"
                + "map.addEventListener('rightclick', function (e) {"
                + "    window.external.SetCenter(e.point.lng, e.point.lat);"
                + "});"
                + "</script>"
                + "</body>"
                + "</html>";
            webviewMap.DocumentText = htmlString;
            webviewMap.ObjectForScripting = this;
        }

        public void SetCenter(string lng, string lat)
        {
            tbxLng.Text = lng;
            tbxLat.Text = lat;
        }

        public LatLng getCenter()
        {
            double lat = Convert.ToDouble(tbxLat.Text);
            double lng = Convert.ToDouble(tbxLng.Text);
            return new LatLng(lat, lng);
        }
    }
后面还有 1 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。