设为首页 加入收藏

TOP

C#的百度地图开发(四)前端显示与定位(五)
2019-09-03 01:38:26 】 浏览:62
Tags:百度 地图 开发 前端 显示 定位
  •                 enableHighResolution: true  
  •             }  
  •             var map = new BMap.Map(normalMapContainerId, mapOption);  
  •             var testpoint = new BMap.Point(lng, lat);  
  •             map.centerAndZoom(testpoint, 18);  
  •             var marker = new BMap.Marker(testpoint);  
  •             marker.enableDragging();  
  •             map.addOverlay(marker);  
  •             marker.addEventListener('dragend', function (e) {  
  •                 panorama.setPosition(e.point); //拖动marker后,全景图位置也随着改变  
  •                 panorama.setPov({ heading: -40, pitch: 6 });  
  •             });  
  •         }  
  •     }  
  • })();  
  • 注:该JS中还封装了全景图的函数。

     

    下面看一下后端代码

     

    [html]  view plaincopy在CODE上查看代码片派生到我的代码片
    1. public partial class ViewMap : System.Web.UI.Page  
    2.     {  
    3.         protected void Page_Load(object sender, EventArgs e)  
    4.         {  
    5.             if (!IsPostBack)  
    6.             {  
    7.                 InitLoad();  
    8.             }  
    9.         }  
    10.   
    11.         private void InitLoad()  
    12.         {  
    13.             Coordinate coordinate = new Coordinate("39.92", "116.46");  
    14.         &n
    首页 上一页 2 3 4 5 下一页 尾页 5/5/5
    】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
    上一篇C#基础知识 下一篇csharp: Linq keyword example

    最新文章

    热门文章

    Hot 文章

    Python

    C 语言

    C++基础

    大数据基础

    linux编程基础

    C/C++面试题目