Đang chuẩn bị liên kết để tải về tài liệu:
Beginning Google Maps Applications with PHP and Ajax From Novice to Professional PHẦN 8

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

bạn có thể sử dụng phương pháp GLog.writeHtml (). Tương tự như vậy, để ra một liên kết có thể click, chỉ cần vượt qua một URL vào GLog.writeUrl (). WriteUrl () là phương pháp đặc biệt hữu ích khi tạo ra các ô bản đồ của riêng bạn, như bạn sẽ thấy trong phần "Thực hiện Loại Bản đồ của, | CHAPTER 9 ADVANCED TIPS AND TRICKS 249 latlng.lng 180 var lat parseInt Math.floor Math.abs this.mapResolutions zoom 2 180 latlng.lat - 90 var point new GPoint lng lat return point BlueMarbleProjection.fromPixelToLatLng function pixel zoom unbounded var lat 90 - pixel.y this.mapResolutions zoom 2 180 var lng pixel.x this.mapResolutions zoom 360 - 180 var latlng new GLatLng lat lng return latlng BlueMarbleProjection.tileCheckRange function tile zoom tileSize var rez this.mapResolutions zoom if tile.y 0 tile.y tileSize rez 2 return false if tile.x 0 tile.x tileSize rez var e Math.floor rez tileSize tile.x tile.x e if tile.x 0 tile.x e return true BlueMarbleProjection.getWrapWidth function zoom return this.mapResolutions zoom The Blue Marble Tiles The Google Maps API assumes a tile size of 256x256 pixels. Although you can change the tile size by using the GMapType tileSize option the Blue Marble images divide nicely by 256 so there s no reason to change the default size for this example. Keeping the same tile size will also allow you to continue reusing most of the other examples in the book without the need to modify code to accommodate a different tile size. Slicing and Dicing To serve up the tiled images for the three maps you have a few options including dynamically creating each tile on the fly preslicing the images and storing them all appropriately on the server or a combination. Taking into consideration the storage requirements discussed earlier and the processing power you ll need to continually slice the images on the fly you ll probably opt to spend a little money on a hard drive if necessary and preslice your images. The three maps sliced for each zoom level will occupy only about 40MB of disk space whereas slicing the images at each request will create a huge drain on resources and slow down the server. 250 CHAPTER 9 ADVANCED TIPS AND TRICKS To slice your images you could use Adobe Photoshop s scripting capabilities and follow the instructions at http .

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.