TAILIEUCHUNG - Lập trình iphone chuyên nghiệp part 15

Chapter 7: Integrating with iPhone Services Trong khi Google Maps không có giao thức riêng của href tùy chỉnh của nó, Mobile Safari trên iPhone có đủ thông minh để định tuyến lại bất kỳ yêu cầu để tích hợp ứng dụng bản đồ thay vì đi trang web công cộng Web Google | Chapter 7 Integrating with iPhone Services Pointing on Google Maps While Google Maps does not have its own custom href protocol Mobile Safari on iPhone is smart enough to reroute any request to to the built-in Maps application rather than going to the public Google Web site. On iPod touch Mobile Safari links directly to the public Google Web site. As a result you can create a link to specify either a specific location or driving directions between two geographical points. You cannot specify whether to display the map in Map or Satellite view. The location you specify will be displayed in the last selected view of the user. Keep in mind the basic syntax conventions when composing a Google Maps URL For normal destinations start with the q parameter and then type the location as you would a normal address substituting signs for blank spaces. For clarity include commas between address fields. Here s a basic URL to find a location based on city and state a href http maps q Boston MA Boston a Here s the syntax used for a full street address a href http maps q 1000 Massachusetts Ave Boston MA Jack Armitage s Office a 167 Chapter 7 Integrating with iPhone Services When the address shown previously is located in Google Maps the marker is generically labeled 1000 Massachusetts Ave Boston MA. However you can specify a custom label by appending the URL with Label Text as shown in the following example a href http maps q 1000 Massachusetts Ave Boston MA Jack Armitage s Office Jack Armitage s Office a Figure 7-10 shows the custom label in Google Maps. Figure 7-10 Customizing the Google Maps label You can specify a location using latitude and longitude coordinates as well a href http maps q Jack s Summer Retreat a 168 Chapter 7 Integrating with iPhone Services To get directions use the saddr parameter to indicate the starting address and daddr parameter to specify the destination .

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.