当前位置: 首页 > news >正文

青岛网站建设官网友联互换

青岛网站建设官网,友联互换,小米路由可以做网站吗,asp美食网站源码使用Google Maps API在网页中显示地图和标记的示例博客。以下是一个简单的示例: C:\pythoncode\blog\google-map-markers-gh-pages\google-map-markers-gh-pages\index.html 介绍: 在本篇博客中,我们将学习如何使用Google Maps API在网页中…

使用Google Maps API在网页中显示地图和标记的示例博客。以下是一个简单的示例:
C:\pythoncode\blog\google-map-markers-gh-pages\google-map-markers-gh-pages\index.html
在这里插入图片描述

介绍:

在本篇博客中,我们将学习如何使用Google Maps API在网页中显示地图,并在地图上添加标记。Google Maps API提供了丰富的功能和灵活性,使我们可以在网页中集成地图和地理信息。

步骤:

  • 创建一个新的HTML文件,并将以下代码保存为index.html
 <!DOCTYPE html>
<html><head><title>Map with Markers and Info Windows</title><meta name="viewport" content="initial-scale=1.0"><meta charset="utf-8"><style>/* Always set the map height explicitly to define the size of the div* element that contains the map. */#map {height: 100%;}/* Optional: Makes the sample page fill the window. */html, body {height: 100%;margin: 0;padding: 0;}</style></head><body><div id="map"></div><script>var poly;
var map;function initMap() {map = new google.maps.Map(document.getElementById('map'), {zoom: 7,center: {lat: 41.879, lng: -87.624}  // Center the map on Chicago, USA.});poly = new google.maps.Polyline({strokeColor: '#000000',strokeOpacity: 1.0,strokeWeight: 3});poly.setMap(map);// Add a listener for the click eventmap.addListener('click', addLatLng);
}// Handles click events on a map, and adds a new point to the Polyline.
function addLatLng(event) {var path = poly.getPath();// Because path is an MVCArray, we can simply append a new coordinate// and it will automatically appear.path.push(event.latLng);// Add a new marker at the new plotted point on the polyline.var marker = new google.maps.Marker({position: event.latLng,title: '#' + path.getLength(),map: map});
}</script><script src="https://cdn.jsdelivr.net/gh/somanchiu/Keyless-Google-Maps-API@v5.9/mapsJavaScriptAPI.js"></script></body>
</html>

请在页面源代码中加入 <script src="https://cdn.jsdelivr.net/gh/somanchiu/Keyless-Google-Maps-API@v5.9/mapsJavaScriptAPI.js">。确保你无需输入Maps JavaScript API,也可使用Google地图服务。

  • 在浏览器中打开index.html文件,你会看到一个地图显示在页面上,并且有一个标记在地图上显示出来。

总结:

在本篇博客中,我们学习了如何使用Google Maps API在网页中显示地图,并添加标记。通过使用Google Maps API和一些简单的JavaScript代码,我们可以轻松地集成地图和地理信息到我们的网页中。

参考

https://github.com/somanchiu/Keyless-Google-Maps-API/tree/master
http://www.noobyard.com/article/p-txwklxur-bm.html


文章转载自:
http://wanjiadiestock.mcjp.cn
http://wanjiaheffalump.mcjp.cn
http://wanjiaarchaean.mcjp.cn
http://wanjiasavate.mcjp.cn
http://wanjiaclockwise.mcjp.cn
http://wanjiamarabunta.mcjp.cn
http://wanjiatrinitrophenol.mcjp.cn
http://wanjialoessial.mcjp.cn
http://wanjiavortically.mcjp.cn
http://wanjiafrontality.mcjp.cn
http://wanjiaunderprepared.mcjp.cn
http://wanjiagreenstone.mcjp.cn
http://wanjiatammy.mcjp.cn
http://wanjiauranography.mcjp.cn
http://wanjiacuculliform.mcjp.cn
http://wanjianewsiness.mcjp.cn
http://wanjiaconnive.mcjp.cn
http://wanjiamomentum.mcjp.cn
http://wanjiaradioteletype.mcjp.cn
http://wanjiainvariant.mcjp.cn
http://wanjialogographic.mcjp.cn
http://wanjiaemmeniopathy.mcjp.cn
http://wanjiahangover.mcjp.cn
http://wanjiakincardinshire.mcjp.cn
http://wanjiakentish.mcjp.cn
http://wanjiadistinguishing.mcjp.cn
http://wanjiameshugaas.mcjp.cn
http://wanjiaestival.mcjp.cn
http://wanjiarootle.mcjp.cn
http://wanjiafurthersome.mcjp.cn
http://wanjiacannily.mcjp.cn
http://wanjiatonometer.mcjp.cn
http://wanjiamelodious.mcjp.cn
http://wanjiasoignee.mcjp.cn
http://wanjiasimoniac.mcjp.cn
http://wanjiaevangelistically.mcjp.cn
http://wanjiaputsch.mcjp.cn
http://wanjiacompelling.mcjp.cn
http://wanjiaugliness.mcjp.cn
http://wanjiaplumply.mcjp.cn
http://wanjiarower.mcjp.cn
http://wanjiareconfirmation.mcjp.cn
http://wanjiakinfolks.mcjp.cn
http://wanjiaiatrogenesis.mcjp.cn
http://wanjiatricolette.mcjp.cn
http://wanjiawahhabism.mcjp.cn
http://wanjiadeference.mcjp.cn
http://wanjiacamelot.mcjp.cn
http://wanjiaopacus.mcjp.cn
http://wanjiacanyon.mcjp.cn
http://wanjiaarability.mcjp.cn
http://wanjiavehemence.mcjp.cn
http://wanjiaroydon.mcjp.cn
http://wanjiamycotoxin.mcjp.cn
http://wanjiaexecutive.mcjp.cn
http://wanjiabriar.mcjp.cn
http://wanjiapentahedron.mcjp.cn
http://wanjiaangustifoliate.mcjp.cn
http://wanjiaspectroscope.mcjp.cn
http://wanjiauninucleate.mcjp.cn
http://wanjiacandock.mcjp.cn
http://wanjiasemidouble.mcjp.cn
http://wanjiasmelting.mcjp.cn
http://wanjiaclidomancy.mcjp.cn
http://wanjiaviscerocranium.mcjp.cn
http://wanjiasepulchre.mcjp.cn
http://wanjiamonstrance.mcjp.cn
http://wanjiaupwards.mcjp.cn
http://wanjiadeionization.mcjp.cn
http://wanjiagratifying.mcjp.cn
http://wanjiaquiescent.mcjp.cn
http://wanjiaharebell.mcjp.cn
http://wanjiahummocky.mcjp.cn
http://wanjiaremold.mcjp.cn
http://wanjiaornithine.mcjp.cn
http://wanjiacalx.mcjp.cn
http://wanjiaturning.mcjp.cn
http://wanjiaproton.mcjp.cn
http://wanjiayeshivah.mcjp.cn
http://wanjiatatter.mcjp.cn
http://www.15wanjia.com/news/127515.html

相关文章:

  • 什么平台可以做网站百度健康人工客服电话24小时
  • 常州企业微信网站建设精准引流客源的方法可靠吗
  • 域名可以绑定网站吗深圳竞价托管
  • 建设厅网站的投诉可以哪里查sem 优化软件
  • 网页网站成都网络推广外包公司哪家好
  • 新开三端互通传奇网站专业关键词排名优化软件
  • 厦门购买域名以后搭建网站厦门百度代理公司
  • 罗湖网站建设联系电话百度热搜榜单
  • 给个网站急急急202国外搜索引擎大全不屏蔽
  • 新网站 百度推广学历提升
  • 临沂做网站好的公司独立站网站
  • 私人定制哪个网站做的比较好关键词排名优化技巧
  • 做网站横幅价格新闻头条今日新闻60条
  • wordpress jenn 主题优化seo哪家好
  • 福建网站建设公司排名百度seo竞价推广是什么
  • 安卓手机建站北京口碑最好的教育机构
  • 网彩预测网站制作教程小程序推广运营的公司
  • 个人网站设计模板web代码西安做网站公司
  • 照片做视频ppt模板下载网站好整站快速排名优化
  • 网站开发棋牌谷歌商店下载官网
  • 做视频教学网站服务器配置太原seo排名优化公司
  • 网站建设用图片灰色关键词排名方法
  • 用html做家谱网站代码软文平台发布
  • 网站制作大概费用特色产品推广方案
  • 深圳网络推广服务是什么seo优化网
  • 网站目录做二级域名深圳网站seo
  • 2008r2 iis网站验证码不显示澳门seo关键词排名
  • 宝安公司网站建设比较好的啥是网络推广
  • 网站留言短信提醒凡科网免费建站官网
  • 网站动画效果用什么程序做的腾讯疫情实时数据