Google map for my blog

Source: Internet
Author: User

Google map for my blog

Author: zhangguiquan

Keywords: Google map and wibsite

Google maps is a very cool WebGIS application, basing on some traditional web and maps technologies and the popular web Tchnology Ajax, whitch is considered as the core parameter loy of the Web 2.0. it's a useful tools for the native people and a gift for the human beings. through the Google Maps application you can search locations as you want and as a GIS tool to navigate your driving and any other thing. google Maps API have being a part of the Google open source program and it available on website: http://www.google.com/apis/maps/ new. though Google maps is a very complex application, you can create simple applications by the standard API and some JavaScript technologies. start now, to create you own map.

The Google Maps API lets you embed Google Maps in your own web pages with JavaScript. you can add overlays to the map (including markers and polylines) and display shadowed "info windows" just like Google Maps.

If you want to put Google Maps on your own web site sign up for a Google Maps API key here. the Maps API is a free beta service, available for any Web site that is free to consumers. please see the Terms of Use for more information. to use the Maps API on an intranet or in a non-publicly accessible application, please check out Google Maps for enterprise.

The following is a example of the process to useing the Google Map, just as a demo for my blog.

Your key is:

ABQIAAAAHNY_AU0cvcSGXupctRLBdhRgv5BhoHLEsxzNIZ_***
(The starts are omited for some reason)

This key is good for all URLs in this directory:

http://blog.csdn.net/natureboy520/

Here is an example web page to get you started on your way to mapping glory:

 

<! Doctype HTML public "-// W3C // dtd xhtml 1.0 strict // en"
Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
<HTML xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<Title> Google Maps javascript API example </title>
<SCRIPT src = "http://maps.google.com/maps? File = API & amp; V = 2 & amp; Key = abqiaaaahny_au0cvcsgxupctrlbdhrgv5bhohlesxzniz _ *** csgrtccebgl4yyplxlyffpx_wobcqtyw"
Type = "text/JavaScript"> </SCRIPT>
<SCRIPT type = "text/JavaScript">...
// <! [CDATA [
Function load ()...{
If (gbrowseriscompatible ())...{
VaR map = new gmap2 (document. getelementbyid ("map "));
Map. setcenter (New glatlng (37.4419,-122.1419), 13 );
}
}
//]>
</SCRIPT>
</Head>
<Body onload = "load ()" onUnload = "gunload ()">
<Div id = "map" style = "width: 500px; Height: 300px"> </div>
</Body>
</Html>

 

A graphic from the demo application as follows:

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.