zoukankan      html  css  js  c++  java
  • aaronyang的百度地图API之LBS云与.NET开发 Javascript API 2.0【把数据存到LBS云2/2】

    中国的IT 需要无私分享和贡献的人,一起努力


    本篇博客来自地址:http://www.cnblogs.com/AaronYang/p/3672898.html,请支持原创,未经允许不许转载

    1.新建一个百度地图父类

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    
    namespace Baidu_POI_AaronYang.Models
    {
        public class BaiduMap
        {
            public string geotable_id { get; set; }
            public string title { get; set; }
    
            public string address { get; set; }
    
            public double longitude { get; set; }
    
            public double latitude { get; set; }
    
            public string ak { get; set; }
            public string tags { get; set; }
    
            /// <summary>
            /// 坐标类型1:GPS经纬度坐标
            ///2:国测局加密经纬度坐标
            ///3:百度加密经纬度坐标
            ///4:百度加密墨卡托坐标
            /// </summary>
    
            private int _coord_type = 3;
            public int coord_type
            {
                get { return _coord_type; }
                set { _coord_type = value; }
            }
    
        }
    }

    文章已经迁移: http://www.ayjs.net/post/101.html

    主要方法就在SaveData()这个方法里面,我把百度返回的结果直接返回给前台,然后用前台的js转换成js然后判断

    百度的create返回json结果示例,我这里又输出百度返回给我的message,如果我们点击保存后alert一个成功的框,就说明我们数据添加成功了

    效果预览静态图:

    动态图:

    没错,就是如此的简单,这里我们继续添加很多数据

    下一次我们将利用LBS的云的数据,给我们提供很多很好的震撼效果,比如麻点地图,获得附近多少米的 跟你使用同型号手机的人的信息


    祝大家学习愉快!

    本篇博客来自地址:aaronyang.cnblogs.com,未经允许不许转载


  • 相关阅读:
    笔记3
    笔记
    指令操作、例子
    python文件操作
    pandas处理excel
    Flask资源
    ImportError: DLL load failed while importing _ssl: 找不到指定的模块。 Failed
    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    selenium 安装与 chromedriver安装
    ubuntu 更换清华源
  • 原文地址:https://www.cnblogs.com/AaronYang/p/3672898.html
Copyright © 2011-2022 走看看