1, use echarts display Baidu map usage (2) write a baidu.html
2,winform Page put a WebBrowser control to place the HTML page of the map
3,winform WebBrowser files in the same directory baidu.html when loading
Webbrw_map.url = new Uri (Path.Combine (Application.startuppath, "baidumap.html"));
4, Load Map
(1), according to the latitude and longitude of the query
var pointx = "31.035434";
var pointy = "121.248119";
Setlocation:html inside the method name according to the latitude and longitude of the query
WebBrw_Map.Document.InvokeScript ("setlocation", new object[] {pointx,pointy});
(2), according to address query
var city= "Shanghai ";
var address= "Zhongshan Park ";
Setaddress::html the method name based on the address query
WebBrw_Map.Document.InvokeScript ("Setaddress", new object[] {city, address});
Get coordinates
Txt_longitude.text = WebBrw_Map.Document.GetElementById ("LNG"). InnerText;
Txt_dimensions.text = WebBrw_Map.Document.GetElementById ("lat"). InnerText;
Winform echarts Display the usage of Baidu map (3)