<script src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true&amp;key=ABQIAAAAIHAbNjJQCreFjDptcT4yjBR2jvTZOFQfaCn8QtYrCty2-BDc7RSG6t6loXYOXGxFmfXf9-Le0DVAQA" type="text/javascript"></script>
// Next, I'm going to show the map in a frame , That is to say DIV Inside <div id="map_canvas" style="width: 500px; height: 300px"></div>
    
<div id="show_x"></div><!-- Show X coordinate -->
<div id="show_y"></div><!-- Show Y coordinate -->
<div id="zoom"></div><!-- Show zoom level -->
// Here's the instantiation google library , I'm going to do it ! <script language="javascript">
        var map = new GMap2(document.getElementById("map_canvas"));// Instantiation , Show google Map
        var center = new GLatLng(39.916912086904624,116.39697074890137);    Specified coordinates      
        map.setCenter(center,);// Specify coordinates , Zoom level ,setcenter  Set the center of the map     
        //var mapControl = new GMapTypeControl();  // Control
        //map.addControl(mapControl); // Control
        //map.addControl(new GLargeMapControl());     // Control         
        var marker = new GMarker(center, {draggable: true});// Can I drag
        map.addOverlay(marker);       // Generated a little tag  //marker 
        
// What's the next part ?
        GEvent.addListener(map, 'click', function(overlay, point) {
          if (point) {
            document.getElementById("show_x").innerHTML = point.x;        // Get the current is x Coordinates of
            document.getElementById("show_y").innerHTML = point.y;        // Get the current is y coordinate
            document.getElementById("zoom").innerHTML = map.getZoom();    // Gets the current zoom level
          }
        });
    </script>

google More related articles on map introduction page

  1. Embedded in a web page google Map

    A preface, General requirements : Warehouse pushpins marked in the map of the United States ( The mouse shows the details of the address ), Add a pushpin to the map by entering the postal code of the destination , Will be sent to , Selected warehouse , The receiving map is connected with a broken line , It's a rough line . I. 1 google open ...

  2. obtain Google Map location coordinates and embedded into the web page

    Sometimes when it comes to web pages , You may need a map display , May be used Google Map , So share it get New skills to . There's this way of looking up information on the Internet But I didn't make it , So I found another way . First , open Google Map , check ...

  3. Google Map

    Google Map development summary We often use maps to look up locations . Look at the bus . Street View , At the same time, maps are open to third parties API For developers . Take advantage of these API Personalized display and control of the map , For example, Beijing is flooded , Develop a web page to show the flooded map of Beijing , The earth ...

  4. stay VC/MFC Embedded in Google Map —— illustrated

    In the near future, the laboratory needs to embed maps in UAV ground stations , I found a lot of information on the Internet , At last, it's a little bit more , First . The knowledge needed to do this is .MFC Control .MFC Class library .JavaScript Scripting language .Google API.Goog ...

  5. How to use google On the map api( Arrangement )

    How to use google On the map api( Arrangement ) One . summary One sentence summary : Direct use script Label quote google Map api that will do . 1. How to use google On the map api? Page references javascript file <s ...

  6. Google Map API V3 Getting started

    Google The official tutorial : Google Map API V3 Getting started Google Map API V3 Develop for mobile devices Google Map API V3 The incident of Google Map API V3 ...

  7. Google Map API V3 Develop for mobile devices

    Google The official tutorial : Google Map API V3 Getting started Google Map API V3 Develop for mobile devices Google Map API V3 The incident of Google Map API V3 ...

  8. Google Map API V3 The incident of

    Google The official tutorial : Google Map API V3 Getting started Google Map API V3 Develop for mobile devices Google Map API V3 The incident of Google Map API V3 ...

  9. 20+ It's a very useful one jQuery Of Google Map plugin

    from :http://www.oschina.net/translate/20-useful-jquery-google-maps-plugins Google Maps are looking for stores or other interesting things we want to know ...

Random recommendation

  1. [ Reprint ]fullPage.js chinese api Configuration parameters ~

    fullPage.js chinese api Configuration parameters Options type The default value is explain verticalCentered character string true Is the content vertically centered resize Boolean value false Does the font scale as the window zooms ...

  2. php export csv Data output in the browser provides examples of downloading or saving to a file

    source :http://www.jb51.net/article/49313.htm 1. Download from browser output /** * Export data to CSV file * @param array $data data * @pa ...

  3. dfa To minimize the , Fixed some bugs in the last version .

    When the last version was tested , Just two very simple test cases , So there are a lot of problems that have not been tested bug1: It's generating diff_matrix When , The loop variable doesn't loop once , This causes the last node to merge with other nodes if it cannot , ...

  4. python Test file coding, etc

    Reference resources :http://my.oschina.net/waterbear/blog/149852 chardet modular , It can check the text coding , Core code : import chardet chardet.d ...

  5. stay mac Take advantage of homebrew Install the software

    stay mac You often need to install some software , You can go through app store download , Or you can download it by browsing and searching . Here we introduce how to use homebrew Install some software , It will automatically download some software dependencies for you , Free from the trouble of installation . First of all, we need ...

  6. CMake Some of the right postures

    1, 2,

  7. Grin v0.5 stay Ubuntu Installation and startup under

    Grin and bitcoin It's also a point-to-point cash trading system , But it validates the algorithm through zero sum , So that the transaction amount of both parties will not be known by the third party , Make it stronger in terms of privacy protection . Its official introduction is : Electronic transactions for all , No censorship or restrictions . And put forward it ...

  8. artTemplate- Excellent front end template engine

    artTemplate- Excellent front end template engine 1.html Introduction in artTemplate Of js file : <script type="text/javascript" src=&qu ...

  9. Java How to achieve synchronization between threads

    1.Object#wait(), Object#notify() Let two threads execute in turn /** * class AlternatePrintDemo.java Implementation description of : Alternate printing */ class NumberPr ...

  10. Common development languages ( or IT technology ) List

    Java. Android. iOS. Web front end . Python. .NET. PHP. C/C++. Linux Database technology