Note: laizhi su Fei's blog cnblogs.com/sufei su Fei
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< Html Xmlns = "Http://www.w3.org/1999/xhtml" > < Head >
<% -- Load local search styles -- %>
< Style Type = "Text/CSS" >
@ Import URL ("http://www.google.com/uds/css/gsearch.css ");
@ Import URL ("http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css ");
}
. Style1 {
Font-size : 12px ;
Color : #003366 ;
}
</ Style >
< Meta HTTP-equiv = "Content-Type" Content = "Text/html; charsets = UTF-8" />
< Title > Su Fei wishes you a safe journey </ Title >
<% -- Google Maps API enables you to embed Google Maps into your own webpage. A map API key is valid only for one "directory" or domain.
For more information, see this FAQ. You must have a Google account to obtain the Maps API key, which is associated with your Google account.
Please apply for an http: // Code.google.com / INTl / ZH - CN / APIS / Maps / Signup.html -- %>
< Script SRC = "Http://maps.google.com/maps? File = API & amp; V = 2 & amp; Key = ABQIAAAAomgcdg9DjL60HKYl-1QbnhRhywW8vKZVMFuSsAE3Eu0YRdhAXhTcj2-jOXN4Kbz6pCI4DnVhXqqW6g"
Type = "Text/JavaScript" > </ Script >
< Script SRC = "Http://www.google.com/uds/api? File = UDS. JS & amp; V = 1.0" Type = "Text/JavaScript" > </ Script >
< Script SRC = "Http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" Type = "Text/JavaScript" > </ Script >
< Script Type = "Text/JavaScript" >
// <! [CDATA [
VaR Geocoder = Null ;
Function Load (){
If (Gbrowseriscompatible ()){
// Here is to enable a map
VaR Map = New Gmap2 (document. getelementbyid ( " Map " ));
// Location of the map center
Map. setcenter ( New Glatlng ( 34.81552976499691 , 113.6833906173706 ), 13 );
// Enable mouse Scaling
Map. enablescrollwheelzoom ();
// Disable mouse Scaling
// Map. disablescrollwheelzoom ();
// Location of a local search
Map. addcontrol ( New Google. Maps. localsearch (), New Gcontrolposition (g_anchor_bottom_right, New Gsize ( - 260 , 0 )));
// Add satellites
Map. addcontrol ( New Glargemapcontrol ());
// Add Map
Map. addcontrol ( New Gmaptypecontrol ());
// Pan and zoom controls (upper left corner)
Map. addcontrol ( New Glargemapcontrol ());
// , Scale replacement (lower left)
Map. addcontrol ( New Gscalecontrol ());
// , Thumbnail Control (lower left)
Map. addcontrol ( New Goverviewmapcontrol ());
// Enable mouse dragging
Map. enabledragging ();
}
}
// ]>
</ Script >
</ Head >
< Body Onload = "Load ()" OnUnload = "Gunload ()" >
<% -- Load the map here -- %>
< Div ID = "Map" Style = "Width: 720px; Height: 500px" > </ Div >
</ Body >
</ Html >