代码如下:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: % }
body { height: %; margin: ; padding: }
#map_canvas { height: % }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=your-api-key&sensor=true">
</script>
<script type="text/javascript">
function initialize() {
var mapOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: ,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
mapOptions);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"> </div>
</body>
</html>

zoom设置得越小~则地图显示范围越大~

new google.maps.LatLng(X,Y)输入经纬度。

获取api-key:
https://developers.google.com/maps/documentation/javascript/tutorial?hl=zh-cn#api_key

https://code.google.com/apis/console/b/0/?noredirect#project:547251066599:access

简易google地图api调用的更多相关文章

  1. Google 地图 API V3 之事件

    Google官方教程: Google 地图 API V3 使用入门 Google 地图 API V3 针对移动设备进行开发 Google 地图 API V3 之事件 Google 地图 API V3 ...

  2. Google 地图 API V3 之控件

    Google官方教程: Google 地图 API V3 使用入门 Google 地图 API V3 针对移动设备进行开发 Google 地图 API V3 之事件 Google 地图 API V3 ...

  3. Google 地图 API V3 之 叠加层

    Google官方教程: Google 地图 API V3 使用入门 Google 地图 API V3 针对移动设备进行开发 Google 地图 API V3 之事件 Google 地图 API V3 ...

  4. Google 地图 API for Android

    原文:Introduction to Google Maps API for Android 作者:Eunice Obugyei 译者:kmyhy 从健康类 app Runkeeper 到游戏 app ...

  5. Android Google 地图 API for Android

    从健康类 app Runkeeper 到游戏 app 精灵宝可梦,位置服务对现代 app 来说越来越重要. 在本文中,我们将创建一个 app,名字就叫做 City Guide.这个 app 允许用户搜 ...

  6. Google 地图 API V3 使用入门

    Google官方教程: Google 地图 API V3 使用入门 Google 地图 API V3 针对移动设备进行开发 Google 地图 API V3 之事件 Google 地图 API V3 ...

  7. Google 地图 API V3 针对移动设备进行开发

    Google官方教程: Google 地图 API V3 使用入门 Google 地图 API V3 针对移动设备进行开发 Google 地图 API V3 之事件 Google 地图 API V3 ...

  8. Google地图接口API之Google地图 API 参考手册(七)

    Google 地图API 参考手册 地图 构造函数/对象 描述 Map() 在指定的 HTML 容器中创建新的地图,该容器通常是一个DIV元素. 叠加层 构造函数/对象 描述 Marker 创建一个标 ...

  9. 腾讯地图 API 调用入门

    本文仅为腾讯地图 API 调用入门,如需进阶学习,请在腾讯位置服务网站上进行学习. 登陆网址 https://lbs.qq.com/ 点击右上角的登陆按钮,需要进行注册按照流程进行就好. 完成之后,选 ...

随机推荐

  1. gcc将多个静态库链接成一个静态库

    参考:https://sourceware.org/binutils/docs/binutils/ar-scripts.html#ar-scripts makefile如下: ARSCRIPT=scr ...

  2. 『安全科普』WEB安全之渗透测试流程

    熟悉渗透流程,攻击会像摆积木一样简单! 0x 01:信息收集 收集网站信息对渗透测试非常重要,收集到的信息往往会让你在渗透中获得意外惊喜. 1. 网站结构 可以使用扫描工具扫描目录,主要扫出网站管理员 ...

  3. 用Jquery 仿VS 样式的 导航栏插件

    在开发B/S 项目过程中,根据主界面设计要求,需要做一个类似VS 左边工具栏样式的菜单导航栏,在网上搜索无果后,于是决定自已做一个. 由于前台用JQuery开发, 想到网上很多人用JQuery做插件, ...

  4. 在VS2008.Net下使用WPF开发Web应用程序

    原文地址:http://hankjin.blog.163.com/blog/static/33731937200922353623434/ 胖客户端的好处是可以轻易的实现绚丽的效果, 而瘦客户端则需要 ...

  5. cf C. Dominoes

    http://codeforces.com/contest/394/problem/C 题意:有n*m个骨牌,每个骨牌上有四种样式(“01,10,11,00”),让你重新排列成一个N*M的矩阵,使2* ...

  6. VS在Release模式下,难道还可以Debug?

    就是这段代码: int main(int argc, char *argv[]) { QApplication a(argc, argv); cxcxsdee w; w.show(); QString ...

  7. Unity 动态载入Panel并实现淡入淡出

    unity版本:4.5 NGUI版本:3.6.5 参考链接:http://tieba.baidu.com/p/3206366700,作者:百度贴吧 水岸上 动态载入NGUI控件,这里用Panel为例说 ...

  8. COJ 2106 road

    road 难度级别: A: 编程语言:不限:运行时间限制:1000ms: 运行空间限制:131072KB: 代码长度限制:102400B 试题描述   某国有N个城市,这N个城市由M条双向道路连接.现 ...

  9. 【线段树】BAPC2014 E Excellent Engineers (Codeforces GYM 100526)

    题目链接: http://codeforces.com/gym/100526 http://acm.hunnu.edu.cn/online/?action=problem&type=show& ...

  10. bzoj 1070 [SCOI2007]修车(最小费用最大流)

    1070: [SCOI2007]修车 Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 3515  Solved: 1411[Submit][Status] ...