码迷,mamicode.com
首页 > Windows程序 > 详细

Google Map API V3开发(2)

时间:2016-04-15 11:57:52      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:

3 Google Map API 简介

Google 地图 API 免费提供给用户并且适用于所有网站。Google 地图 API 使您能够使用 JavaScript 将 Google地图嵌入自己的网页中。API 提供了大量实用工具用以处理地图(正如 http://ditu.google.com 网页上的地图),并通过各种服务向地图添加内容,从而使您能够在您的网站上创建功能强大的地图应用程序。

技术分享

 

4 帮助资源

?英文页面:

https://developers.google.com/maps/documentation/javascript/tutorial

这里有全部API接口介绍及示例。

 

?Google Maps Markers

http://mabp.kiev.ua/2010/01/12/google-map-markers/

 

这里是我找到的Google官方图标最全的地方了。直接复制图标URL到程序里即可使用。

5 Hello Google Map

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

<head runat="server">

    <title>Google Maps API V3 Demo</title>

    <script type="text/javascript" src=‘http://maps.googleapis.com/maps/api/js?v=3&sensor=true&language=hk‘></script>

    <script type="text/javascript">

          var map;

          function initialize() {

            var myOptions = {

                zoom: 13,

                center: new google.maps.LatLng(22.1623, 113.5552),

                mapTypeId: google.maps.MapTypeId.ROADMAP,

                scaleControl: true,

                scaleControlOptions: {

                    position: google.maps.ControlPosition.LEFT_BOTTOM

                }

            }

            map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);

        }

    </script>

</head>

<body onload="initialize()">

    <div id="map_canvas" style="width: 100%; height: 100%;"></div>

</body>

 

</html>

 

Google Map API V3开发(2)

标签:

原文地址:http://www.cnblogs.com/jhlong/p/5394779.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!