tailieunhanh - Professionali Phone and iPod touch Programming phần 7

Khi địa chỉ thể hiện trước đó nằm trong Google Maps, đánh dấu tổng quát là dán nhãn 1000 Massachusetts Ave Boston MA. Tuy nhiên, bạn có thể chỉ định một nhãn tùy chỉnh bằng cách phụ thêm địa chỉ URL (Tiêu đề + Label) + như trong ví dụ sau đây: | 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 address as shown in the following example a href http maps saddr Holden MA daddr 1000 Massachusetts Ave Boston MA Directions To Office a Figure 7-11 displays the map view when this link is clicked. Figure 7-11 Programming driving directions Google Maps on its public Web site has an extensive set of parameters. However except where noted previously none of these are supported at this time. You cannot for example use the t parameter to specify the Satellite map the z parameter to indicate the map zoom level or even layer t to turn on the Traffic display. The user needs to perform those steps interactively. 169 Chapter 7 Integrating with iPhone Services In order to add Google Maps integration with iProspector two new capabilities need to be added to its Contact panel. First multiline read-only address information needs to be displayed in its own box. Second a new action button style needs to be created to emulate the button functionality of the native iPhone Contact UI. Creating a Contacts Address Box To define an address box define a div with a new style named rowCuiAddressBox. Inside of it add a cui label and then cui p elements for each line of the .

TỪ KHÓA LIÊN QUAN