TAILIEUCHUNG - Beginning Google Maps Applications with PHP and Ajax From Novice to Professional PHẦN 2

alert ('tiến trình đáp ứng');}} Nếu bạn chạy các kịch bản hơn và hơn, đôi khi hộp thoại cảnh báo sẽ xuất hiện trong quá trình để đáp ứng sau đó tiếp tục, nhưng nhiều khả năng, bạn sẽ nhận được Tiếp tục sau đó yêu cầu quá trình. Chỉ cần nhớ rằng nếu bạn muốn một cái gì đó xảy ra sau khi phản hồi, | CHAPTER 2 GETTING STARTED 15 Examining the Sample Map Once you have the file in Listing 2-1 uploaded to your webspace check it out in a browser. And ta-da a map in action Listing 2-1. The Google Maps API Starter Code DOCTYPE html PUBLIC - W3C DTD XHTML Strict ZEN http TR xhtml1 DTD html xmlns http 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 file api amp v 2 amp key ABQIAAAA 33EjxkLYsh9SEVeh_MphphQP1yR2bHJW2Brl_bW_l0KXsyt8cxTKO5Zz-UKoJ6Ie pTlZRxN8nfTRgw type text javascript script script type text javascript CDATA function load if GBrowserIsCompatible var map new GMap2 map new GLatLng 13 script head body onload load onunload GUnload div id map style width 500px height 300px div body html In Listing 2-1 the container holding the map is a standard XHTML web page. Alot of the listing here is just boilerplate standard initialization instructions for the browser. However there are three important elements to consider. First the head of the document contains a critical script element. Its src attribute points to the location of the API on Google s server and your key is passed as a parameter script src http maps file api amp v 2 amp key YOUR_KEY_HERE -type text javascript script Second the body section of the document contains a div called map div id map style width 500px height 300px div 16 CHAPTER 2 GETTING STARTED Although it appears empty this is the element in which the map will sit. Currently a style attribute gives it a fixed size however it could just as easily be set it to a dynamic size such as width 50 . Finally back in the head there s a script element containing a short JavaScript which is triggered by the document body s onload event. It s this code that communicates with Google s API and actually sets up the map. function load .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.