Now that you’ve seen how simple it is to create a Google Maps application let’s dive into the
details of the Google Maps API so that you can get a much deeper understanding of how
you can manipulate the API in your web mapping applications.
In Figure 5 you will see a visual depiction of some of the more commonly used objects in
the Google Maps API. Obviously all Google Maps applications will have a map as the main
display object. This map is represented in the API by the GMap2 object. A number of map
navigation controls can be added to the map including GLargeMapControl,
GSmallMapControl, GMapTypeControl, and the newly released GOverviewMapControl.
These controls are used to zoom in and out, pan the map, enable the display of aerial
photography, streets, and other background information, and provide the ability to include
an overview map. GMarker refers to a geographic point of some type and is represented
with an icon. You can use the default icons provided by Google or define your own custom
icons. Typically, these markers refer to an address stored in a database or XML file.
Info Windows are often used in conjunction with GMarker to display attribute information about
the marker. For instance, in a real estate application you might display a photo of a home
along with other relevant details such as the sales price, square footage, number of bedrooms
and baths. These are some of the most commonly used objects, but there are others that we
will explore as well throughout this course.
ตอนนี้คุณได้เห็นวิธีที่ง่ายก็คือการสร้าง Google Maps โปรแกรมดำน้ำกันเข้าไป
รายละเอียดของ Google Maps API เพื่อให้คุณสามารถได้รับความเข้าใจที่ลึกซึ้งมากว่า
คุณสามารถจัดการ API ในการใช้งานของคุณแผนที่เว็บ .
ในรูปที่ 5 คุณจะเห็นภาพที่มองเห็นจากบางส่วนของ ที่ใช้บ่อยในวัตถุ
Google Maps APIเห็นได้ชัดว่าทุกการใช้งาน Google Maps จะมีแผนที่เป็นจอแสดงผลหลัก
วัตถุ แผนที่นี้จะแสดงใน API โดย gmap2 วัตถุ หมายเลขแผนที่
นำร่องการควบคุมสามารถเพิ่มแผนที่รวมทั้ง glargemapcontrol
gsmallmapcontrol gmaptypecontrol , , , และออกใหม่ goverviewmapcontrol .
การควบคุมเหล่านี้จะใช้ในการซูมเข้าและออก , แพนแผนที่ให้แสดงทางอากาศ
การถ่ายภาพ , ถนน , และข้อมูลอื่น ๆและให้ความสามารถในการรวม
ภาพรวมแผนที่ gmarker หมายถึงจุดทางภูมิศาสตร์ของบางชนิดและเป็นตัวแทน
กับไอคอน คุณสามารถใช้ไอคอนเริ่มต้นให้โดย Google หรือกำหนดไอคอนที่กำหนดเอง
ของคุณเอง โดยปกติ เครื่องหมายนี้หมายถึงที่อยู่ที่เก็บไว้ในฐานข้อมูลหรือแฟ้ม XML .
หน้าต่างข้อมูลมักจะใช้ร่วมกับ gmarker เพื่อแสดงข้อมูลเกี่ยวกับ
เครื่องหมายคุณลักษณะ ตัวอย่างเช่นในอสังหาริมทรัพย์โปรแกรมคุณอาจแสดงรูปถ่ายของบ้าน
พร้อมกับรายละเอียดที่เกี่ยวข้องอื่น ๆ เช่น ราคา ขาย ตร. ฟุต จำนวนห้องนอน
ห้องน้ำด้วย เหล่านี้คือบางส่วนของวัตถุที่ใช้มากที่สุด แต่มีคนอื่นที่เรา
จะสำรวจได้เป็นอย่างดีตลอดหลักสูตรนี้
การแปล กรุณารอสักครู่..
