跳至主要内容

用百度地图api快速实现经纬度地理位置可视化

原文地址是用百度地图api快速实现经纬度地理位置可视化,对作者表示感谢

在数学建模中,常常会有一些地理位置数据。为了快速地展现其位置分布,可以用百度地图api快速实现地理位置可视化。
api001
 



0.概述

在会遇到一些与地理位置相关的建模问题时,难免会遇到需要可视化展示地理位置信息的需求。
可能许多人的第一反应是:
WTF我没做过前端,也不会js,这个东西怎么办
事实上,队伍内展示,或者只是作为团队内构建道路信息的工具,就可以用在线地图api实现可视化。(开发产品当然另当别论)
本篇学习笔记以百度地图api为例。只要稍微上过大学课程的c++之类的,看得懂一点点代码,就可以按照百度地图api手册给出的demo加以发挥。


1.开发者账户相关


用百度id注册百度地图开放平台,验证手机号和邮箱地址,会获得免费的配额。新建应用,获得秘钥。
包含以下内容及相应配额(懒..直接粘贴的表格)
服务名称配额消费配额上限操作
云存储API(存储)
存储空间:
0%
总存储空间: 10240MB
查看文档 数据管理 配额申请
云存储API
请求数:
0%
总请求数: 10万次/天
查看文档 数据管理 流量图 配额申请
云检索API
请求数:
0%
总请求数: 10万次/天
查看文档 流量图 配额申请
Javascript API
无请求数限制
查看文档
Place API v2
请求数:
0%
总请求数: 0.2万次/天
查看文档 流量图 配额申请
Geocoding API v2
请求数:
0%
总请求数: 0.6万次/天
查看文档 流量图 配额申请
IP定位API
请求数:
0%
总请求数: 100万次/天
查看文档 流量图 配额申请
路线交通API
请求数:
0%
总请求数: 0.2万次/天
查看文档 流量图 配额申请
Android导航离线SDK
无请求数限制
IOS导航离线SDK
无请求数限制
Android导航SDK
无请求数限制
查看文档
IOS导航SDK
无请求数限制
静态图API
请求数:
0%
总请求数: 100万次/天
查看文档 流量图 配额申请
全景静态图API
请求数:
0%
总请求数: 10万次/天
查看文档
坐标转换API
请求数:
0%
总请求数: 10万次/天
查看文档 流量图 配额申请
鹰眼API
请求数:
0%
总请求数: 10万次/天
查看文档 流量图 配额申请
到达圈
请求数:
0%
总请求数: 0.01万次/天
Android导航 HUD SDK
无请求数限制
IOS导航 HUD SDK
无请求数限制
云逆地理编码API
请求数:
0%
总请求数: 0.2万次/天
流量图 配额申请
Routematrix API
请求数:
0%
总请求数: 0.2万次/天
流量图 配额申请
云地理编码API
请求数:
0%
总请求数: 0.2万次/天
高精度IP定位
请求数:
0%
总请求数: 0.1万次/天
流量图 配额申请
时区服务 API
请求数:
0%
总请求数: 0.2万次/天



2.开发手册、demo

百度地图开放平台js开发demo

对于一种想要展示一系列展示固定点的需求,可以使用“麻点图层”的方法
api003
demo调试界面

3.坐标信息管理

注意到 “geotableId”:

麻点图层的原理,是使用百度云存储api(LBS云),送入自己点坐标信息的数据。再通过调用CutsomLayer在地图表层绘制麻点。
在百度云存储api的数据管理页面,可以通过可视化锚点,或者上传规范格式的csv快速添加数据(当然也可以通过get put直接上传,如果没有需求,当然可以只通过上传csv添加数据)
api005
数据管理可视化界面
新建一个数据表,括号内即为geotableId。
csv可以直接下载示例,然后用excel可视化编辑。注意文档中给出的表值定义,不要填错
http://lbsyun.baidu.com/index.php?title=lbscloud/api/geodata
上传后可导入位置信息

4.api使用


官方给出的示例如下
需要修改:
最后将代保存成html文件,本地打开或者上传到网页空间,能获得自己创建的麻点图,实现快速静态位置信息可视化。

api001

5.后记

还是那句,在一些队伍内展示的场合,或者只是团队内构建道路信息的工具,就可以用在线地图api实现可视化。开发产品当然另当别论,需要深入研究前端,实现交互、实时更新等等。

Popular posts from 产品随想的博客

产品随想 | 周刊 第88期:抢救中文社科历史讲座

  抢救中文人文社科历史讲座   https://github.com/jeffyus/renwenjiangzuo 苹果公司的招聘理念就是两点。 (1)优秀人才是自我管理的,但需要领导者为大家提供一个共同目标。 (2) 只有某个人看到 Macintosh 电脑感到无比兴奋,我们才会雇佣他。 ————喬布斯 衡量一个人的领导能力的最好方法,就是看如果这个人休假了,他的下属在做什么。 优秀的产品经理和工程师可以休假一周,他管理的工作不发生任何问题。优秀的主管和技术负责人可以休假一个月。领导能力越优秀,休假的时间就越长。 -- Andrew Bosworth,Facebook 的 CEO ——可惡,想了想,好像還真是這樣 阅读不会过时,除非写作过时了。写作不会过时,除非思考过时了。(Reading won't be obsolete till writing is, and writing won't be obsolete till thinking is.) -- Paul Graham ——深刻 Cheetah   https://github.com/leetcode-mafia/cheetah Cheetah is an AI-powered macOS app designed to assist users during remote software engineering interviews by providing real-time, discreet coaching and live coding platform integration. 對面試官的要求,變更高了,哈哈哈 AI's Hardware Problem   https://asianometry.substack.com/p/ais-hardware-problem 有趣,瓶頸在內存 Clash 入土为安   https://gyrojeff.top/index.php/archives/Clash-入土为安/ 有趣的介紹 OP Vault ChatGPT   https://github.com/pashpashpash/vault-ai Give ChatGPT long-term memory using the ...

产品随想 | 周刊 第69期:Do not go gentle into that good night

Products Windows Apps That Amaze Us   https://amazing-apps.gitbook.io/windows-apps-that-amaze-us/ 令人精细的Windows App 文物出版社   https://book.douban.com/press/2456/ 这是一个宝藏出版社,出品书籍质量非常高,大开眼界 blind   https://www.teamblind.com/ 老外的匿名职场社交工具,挺有意思,看看硅谷的meme 中国科学技术大学测速网站   https://test.ustc.edu.cn/ 看着还不错,挺靠谱的 底层代码是LibreSpeed   https://github.com/librespeed/speedtest 能不能好好说话?   https://github.com/itorr/nbnhhsh 也是我的一个痛点 Tree Style Tab (aka TST)   https://github.com/piroor/treestyletab 一个超强的浏览器扩展插件,树状呈现浏览器标签 Failory Pitch Decks   https://www.failory.com/pitch-deck 超级多的融资计划投资板,Pitch Book AutoCut   https://github.com/mli/autocut 用文本编辑器剪视频 全网漫游指南   https://tagly.notion.site/tagly/a333efd8c3e54e12b123acd541e8d3e6 数字时代的指引,希望他们成功 IT eBooks   https://it-ebooks.info/ IT书籍下载 ToastFish   https://github.com/Uahh/ToastFish 一个利用摸鱼时间背单词的软件。 利用Win10通知栏,出现、背单词 Ideas 沈向洋:IDEA 如何找到创新的「甜区」   https://mp.weixin.qq.com/s/OlI5VUxQKU_ijWZClQCG0Q AIGC How Did Nor...

可能比较危险的

全网监控公司: 1)中国厦门的美亚柏科 2)KIS(Knowlesys Intelligence System) 3)除中美之外的第三大AI监控技术供应商是:日本的NEC Corporation 中国的VPN公司: 1)VyprVPN、玲珑加速器 Point: 1)被GFW屏蔽的IP,反向也会无法访问大陆网络

Steve Jobs introduced the iPhone on January 9, 2007.

This is a day I’ve been looking forward to for two and a half years. Link Every once in a while, a revolutionary product comes along that changes everything. And Apple has been— well, first of all, one’s very fortunate if you get to work on just one of these in your career. Apple’s been very fortunate. It’s been able to introduce a few of these into the world. In 1984, we introduced the Macintosh. It didn’t just change Apple, it changed the whole computer industry. In 2001, we introduced the first iPod, and it didn’t just change the way we all listen to music, it changed the entire music industry. Well, today, we’re introducing three revolutionary products of this class. The first one is a widescreen iPod with touch controls. The second is a revolutionary mobile phone. And the third is a breakthrough internet communications device. So, three things: a widescreen iPod with touch controls; a revolutionary mobile phone; and a breakthrough internet communicat...

Interview at the All Things Digital D5 Conference, Steve and Bill Gates spoke with journalists Kara Swisher and Walt Mossberg onstage in May 2007.

Kara Swisher: The first question I was interested in asking is what you think each has contributed to the computer and technology industry— starting with you, Steve, for Bill, and vice versa. Steve Jobs: Well, Bill built the first software company in the industry. And I think he built the first software company before anybody really in our industry knew what a software company was, except for these guys. And that was huge. That was really huge. And the business model that they ended up pursuing turned out to be the one that worked really well for the industry. I think the biggest thing was, Bill was really focused on software before almost anybody else had a clue that it was really the software that— KS: Was important? SJ: That’s what I see. I mean, a lot of other things you could say, but that’s the high-order bit. And I think building a company’s really hard, and it requires your greatest persuasive abilities to hire the best ...

ISSUU使用指南--木喵

作者: 木喵   出处: Wonderworks 问:issuu是什么? 答:Issuu是国外的一个在线文档共享网站,它是你的PDF文档发布专家。它类似于我们熟悉的youtube,但它共享的是文档、杂志之类的文本。 简而言之、同志们想看国外的各种杂志? 想找国外的汇报文本么? 想借鉴国外学生的作品集么? 那么你就要用到它啦~ 今天主要和大家讲两个方面 一、如何在pc端使用和下载issuu上的pdf文档 首先我们打开issuu的网址 https://issuu.com/ 我们可以很清楚的看到网页上呢都是国外的杂志以及一些作者自己制作的pdf文档 首先我们点击右上角的 sign up  然后填写相关信息注册一个账户: 注册完成之后我们就可以搜索我们想要找的资料: 比如说,我想找一些分析图的资料,我们就搜索: architecture diagram 然后我们就可以看到相关的文档了: 点击你所选择的文档, 好了问题来了: sorry,this publication is not available 这个时候!就需要在用pc端的我们做一件必不可少的事: 翻墙 然后我们就能将页面刷新粗来了 好、接下来是非常有建设性意义的一步 怎样把我们网页上的文件 下载下来 呢? 截图? no~no~no~ 接下来,让木喵告诉你怎么下载: 首先你需要复制上面的网址 然后将 https://wenfan.hk/issuu/index_link.php 在另一个网址中打开 将你之前复制的pdf的网址粘贴在下面的对话框中 点击 I‘m not a robot 再点击 get it 然后会出现一堆网址代码 我们 全选 打开你的迅雷点击 新建 将你之前的复制粘贴到下载链接里 然后呢~我们就全都下载成功啦~ 然后我们回到之前的网页向下看 我们可以看到有上传文档的作者(记得要关注哟) 然后还有 info   share   stack   ❤ 如果...

《Becoming Steve Jobs》Chapter 12 Two Decisions

Jim Collins, the bestselling author of the management classics Built to Last: Successful Habits of Visionary Companies and Good to Great: Why Some Companies Make the Leap … and Others Don’t, has a wonderful phrase to describe an essential characteristic of great leaders: deep restlessness. Collins applies the phrase to Steve, one of the two great leaders who inspire him the most (the other is Winston Churchill, the great English politician who was prime minister during most of World War II, from 1940 to 1945, and again from 1951 to 1955). Collins believes this restlessness is far more important and powerful than simple ambition or raw intelligence. It is the foundation of resilience, and self-motivation. It is fueled by curiosity, the ache to build something meaningful, and a sense of purpose to make the most of one’s entire life. 自己何其有幸,在不到30的年纪,就能感受到乔布斯的心境 “The things he was trying to do,” says Collins, “were always hard. Sometimes those things beat him up. But the response to fighti...

产品随想 | 周刊 第43期:历史上的今天

Products Huberman Lab   https://hubermanlab.com/ 一款聚焦于健康的播客 今日热榜   https://tophub.today/ 聚合展示,国内各热门榜单,对跟进热点非常有帮助,热点运营的好帮手 SketchyBar   https://github.com/FelixKratz/SketchyBar A highly customizable macOS status bar replacement Mac菜单栏定制 自定义程度很高,看作者展示的案例,暂时没想出这样的好处(不过应用本身的编辑,确实也没啥意义)生命在于折腾吧! Thanks-Mirror   https://github.com/eryajf/Thanks-Mirror 整理记录各个包管理器,系统镜像,以及常用软件的好用镜像,Thanks Mirror。 Musicn   https://github.com/zonemeen/musicn 一个下载高品质音乐的命令行工具,音乐来源: 咪咕 Planet Minecraft A creative Minecraft community fansite sharing maps, minecraft skins, resource packs, servers, mods, and more. 里面有很多动人的故事 可能是世界上最大的Minecraft社区,从2010年至今 The Uncensored Library   https://www.uncensoredlibrary.com/en blockworks   https://www.blockworks.uk/ "Distinctive maps for Minecraft that have educated players and risen to the level of art" 游戏也可以让人有更高的实现,而不仅仅是沉迷其中,国外游戏厂商比我们做的好太多 Minecraft_Memory_Bypass_GUI   https://github.com/xingchuanzhen/Minecraft_Memory_Bypass_GUI 绕过Minecraft...

《Becoming Steve Jobs》Chapter 17 “Just Tell Them I’m Being an Asshole”

For several months, I had been working to set up a joint interview of Steve, Andy Grove, Bill Gates, and Michael Dell. The confab was supposed to kick off the reporting for a book I had in mind. I had what I thought was a snappy title—Founders Keepers—and a plan to describe how a handful of geeky entrepreneurs had evolved into captains of industry; how self-absorbed inventors morphed into self-taught empire builders; how shaggy-haired idealists managed to stay in the saddle even as the companies they created grew rapidly by orders of magnitude, and as their own wealth and influence over the world itself became far more than the stuff of dreams. 好可惜啊,这次采访没有成形 During this time, Steve came to visit me in the hospital a couple of times. I was so addled with sedatives and painkillers and my own delirious hallucinations that during one visit I expressed my sincerest regrets at not being able to play saxophone in a Beatles retrospective show he was planning to put on in Las Vegas with Ringo S...

《Becoming Steve Jobs》Chapter 11 Do Your Level Best

As a mass-market consumer electronics device, the iPod would eventually be sold, of course, all the usual places: Best Buy, Circuit City, big-box department stores, and even the computer retailers like CompUSA. Steve disdained all these outlets. His obsession with his products continued well after they’d been manufactured. The tacky, low-margin hustle of these chains ran completely against the minimalist aesthetic of his products and the clean exuberance of his marketing. There was only one place where he really enjoyed seeing his products sold to the public: his own Apple stores, which had debuted four months ahead of the iPod. 觉得那些喧嚣、嘈杂的零售渠道,配不上自己极美的产品 Going back as far as the debut of the Mac, Steve had always groused about the way Apple computers were sold in its resellers’ stores. The way his computers were displayed and sold represented the very worst of what could go wrong when things weren’t done his way. The salespeople, always interested in quick turnover, seemed to make litt...