Demo - google map - hiển thị ngôn ngữ tiếng việt RUN
x
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
5
        <style type="text/css">
6
            html { height: 100% }
7
            body { height: 100%; margin: 0; padding: 0 }
8
            #map-canvas { height: 100% }
9
        </style>
10
        <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDfNk5eVWmQB9e6ApnWzICLNIY5lUXpOBw&language=vi"></script>
11
        <script type="text/javascript">
12
            // Function khởi tạo google map
13
            function initialize()
14
            {
15
                // Config google map
16
                var mapOptions = {
17
                    // Tọa độ muốn hiển thị ban đầu (tung độ,vỹ độ)
18
                    center: new google.maps.LatLng(10.771971, 106.697845),
19
                    // Mức độ zoom
20
                    zoom: 8
21
                };
22
23
                // Hiển thị map lên bản đồ (div#map-canvas)
24
                var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
25
            }
26
27
            // Gán hàm initialize vào trong sự kiện load dom google map
28
            google.maps.event.addDomListener(window, 'load', initialize);
29
        </script>
30
    </head>
31
    <body>
32
        <div id="map-canvas"/>
33
    </body>
34
</html>