<div id="contact_container" style="width:700px;height:600px;"></div>


<script type="text/javascript">

function initialize() {

   var myLatlng = new google.maps.LatLng(39.95745,116.32764);

   var myOptions = {

     zoom: 18,

     center: myLatlng,

     mapTypeId: google.maps.MapTypeId.ROADMAP

   }

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


   var marker = new google.maps.Marker({

      position: map.getCenter(),

      map: map,

      title: 'CAAS'

    });

 }

   

 function loadScript() {

   var script = document.createElement("script");

   script.type = "text/javascript";

   script.src = "http://maps.google.com/maps/api/js?language=en&sensor=false&callback=initialize";


   document.body.appendChild(script);

 }

   

 window.onload = loadScript;

</script>

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 V3 针对移动设备进行开发

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

  5. Google 地图 API V3 之事件

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

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

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

  7. Google 地图 API for Android

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

  8. Android Google 地图 API for Android

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

  9. Baidu与Google地图API初探

    前天周六,有个好友过来玩,他说想在他的站点中加入地图导航模块,但不知道选择哪个第三方Map API 在网上查了下Baidu.Google.QQ和MapBar等4种Map API(都是採用JS开放API ...

随机推荐

  1. python 命令行:help(),'more'不是内部或外部命令,也不是可运行的程序或批处理文件

    Python下使用help(dict),显示'more'不是内部或外部命令,也不是可运行的程序或批处理文件,该如何处理? 环境变量设置的问题,进入 Path 的环境变量设置界面,将;%SystemRo ...

  2. ArcGIS中ObjectID,FID和OID字段区别

    lysc_forever 原文 ArcGIS中ObjectID,FID和OID字段有什么区别 ArcGIS Desktop 独立的表和属性表都有一个ObjectID字段.这个字段中包含一个唯一的,长整 ...

  3. [Yarn] A JavaScript Package Manager

    Yarn is a new JavaScript package manager that aims to be speedy, deterministic, and secure. See how ...

  4. echart报表插件使用笔记(二)--按月统计

    按月统计注冊人数 java类: package com.spring.controller; import java.io.IOException; import java.sql.Connectio ...

  5. C++ 指针(不论什么一个指针本身的类型都是unsigned long int型)

    1.指针数组: 即 数组的元素是指针型; 例:int*pa[2]; 明明是一维的指针数组.竟当作二维数组用. [cpp] view plain copy //利用指针数组存放单位矩阵 #include ...

  6. js进阶正则表达式实现过滤字符串(RegExp对象操作正则表达式)(正则:regular)(表达式:expression)

    js进阶正则表达式实现过滤字符串(RegExp对象操作正则表达式)(正则:regular)(表达式:expression) 一.总结 1.str_replace:正则作用:高效快速匹配 2.break ...

  7. [Angular Router] Lazy loading Module with Auxiliary router

    Found the way to handle Auxiliary router for lazy loading moudle and erge load module are different. ...

  8. 【9107】Hanoi双塔问题(NOIP2007)

    Time Limit: 10 second Memory Limit: 2 MB 问题描述 给定A,B,C三根足够长的细柱,在A柱上放有2n个中间有孔的圆盘,共有n个不同的尺寸,每个尺寸都有两个相同的 ...

  9. 文件上传api——MultipartFile

    MultipartFile 方法总结  byte[] getBytes() 返回文件的内容作为一个字节数组.  String getContentType() 返回文件的内容类型.  InputStr ...

  10. 【u208】修复公路

    Time Limit: 1 second Memory Limit: 128 MB [问题描述] A地区在地震过后,连接所有村庄的公路都造成了损坏而无法通车.政府派人修复这些公路. 给出A地区的村庄数 ...