<html xmlns="http://www.w3.org/1999/xhtml">

    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

        <title>My first map</title>

 

        <style type="text/css">

            <!-- #map
{

                width:
100%;

                height:
500px;

                border:
1px
solid
#000;

            }

            -->

        </style>

 

        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

        <script>

            window.onload = function() {

                // Creating a reference to the mapDiv

                var mapDiv = document.getElementById('map');

                // Creating a latLng for the center of the map

                var latlng = new google.maps.LatLng(39.92, 116.46);

                // Creating an object literal containing the properties

                // we want to pass to the map

                var options = {

                    center: latlng,

                    zoom: 10,

                    mapTypeId: google.maps.MapTypeId.ROADMAP

                };

                // Creating the map

                var map = new google.maps.Map(mapDiv, options);

            }

        </script>

    </head>

 

    <body>

        <h1>My first map</h1>

        <div id="map"></div>

    </body>

 

</html>

 

Google Maps API3 之 Hello World的更多相关文章

  1. 检索Google Maps地图位置(小训练)

    名称:检索地图位置 内容:地图初期显示和检索显示 功能:根据条件检索地图的经度与纬度 1.在这之前我们需要创建一个表(Accoun__c),添加一个重要的字段地理位置情報,它会默认的给你两个字段经度和 ...

  2. Google Maps API V3 之绘图库 信息窗口

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

  3. Google Maps API V3 之 图层

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

  4. Google Maps API V3 之 路线服务

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

  5. Google Maps地图投影全解析(3):WKT形式表示

    update20090601:EPSG对该投影的编号设定为EPSG:3857,对应的WKT也发生了变化,下文不再修改,相对来说格式都是那样,可以到http://www.epsg-registry.or ...

  6. google maps js v3 api教程(3) -- 创建infowindow

    原文地址 前面我们学习了地图和标记的创建.那么今天我们来学习怎样在地图上显示一个窗口(infowindow) infowindow构造函数为:InfoWindow(opts?:InfoWindowOp ...

  7. google maps js v3 api教程(2) -- 在地图上添加标记

    原文链接 google maps javascript官方文档:https://developers.google.com/maps/documentation/javascript/ 我们在创建地图 ...

  8. google maps js v3 api教程(1) -- 创建一个地图

    原文地址 google maps javascript官方文档:https://developers.google.com/maps/documentation/javascript/ 在创建地图之前 ...

  9. Google Maps投影在ArcGIS中的设置

    Google Maps采用的地图投影为Web Mercator,其优点为不同维度其形状保持不变,当然面积要发生变化. ArcGIS9.3中可以直接设置为WGS 1984 Web Mercator,操作 ...

随机推荐

  1. ibox 的使用

    <div class="ibox float-e-margins"> <div class="ibox-title"> <h5&g ...

  2. 【转载】MyBatis批量插入数据(insert)

    介绍:MyBatis批量插入数据,原理就是在xml文件中添加 foreach 语句,然后MyBatis自动在values后面添加多个括号: XML文件如下: <?xml version=&quo ...

  3. PHP无限极菜单

    权限表结构 CREATE TABLE `blog_auth` ( `id` ) unsigned NOT NULL AUTO_INCREMENT COMMENT '序号', `pid` ) NOT N ...

  4. 基础python规范

    一.注释     合理的代码注释应该占源代码的 1/3 左右,Python 语言允许在任何地方插入空字符或注释,但不能插入到标识符和字符串中间.     在 Python 中,通常包括 3 种类型的注 ...

  5. python中sort和sorted用法的区别

    Python list内置sort()方法用来排序,也可以用python内置的全局sorted()方法来对可迭代的序列排序生成新的序列 一,最简单的排序 1.使用sort排序 my_list = [3 ...

  6. 学习GTK+ (1) ——编写helloworld

    环境 我使用的是新安装的manjaro 18.1 (kde版),安装新系统后后直接可以开始写代码,不需要安装各种调用的库等. 推荐一个网站,gnome开发者 https://developer.gno ...

  7. Codeforces 1097F. Alex and a TV Show

    传送门 由于只要考虑 $\mod 2$ 意义下的答案,所以我们只要维护一堆的 $01$ 容易想到用 $bitset$ 瞎搞...,发现当复杂度 $qv/32$ 是可以过的... 一开始容易想到对每个集 ...

  8. mac电脑开机键盘和鼠标失灵

    今天早上电脑刚开机发现,触摸板动不了了,过了一会屏幕上就出现蓝牙键盘连接不了的东东,马上意识到键盘也输入不了了.本来还以为得去守候维修了,百度了下解决方法,好在暂时解决了.亲测有效的两个方法(早上晚上 ...

  9. virtual和override

    偶然间看到的题,借此记录. class Program { static void Main(string[] args) { D d = new D(); //第一个D是申明类,第二个D是实例类 A ...

  10. easyUi 的form和validate组件

    以下代码不能运行,只是我在学习过程中记录的笔记,但代码可以用!!! 可以按照需要截取. <%@ page language="java" contentType=" ...