Przewodnik dla programistów
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ta sekcja zawiera strony z dodatkowymi informacjami o najważniejszych elementach KML i o tym, jak ich używać.
- Pliki KMZzaktualizowane
Dowiedz się, jak skompresować (i skompresować) plik KML i wszystkie powiązane z nim obrazy, nakładki, ikony oraz pliki dźwiękowe w jednym przejrzystym folderze, który można opublikować lub przesłać e-mailem jako pojedynczy element.
- Odbywanie wycieczek
- Google Earth 5.0 przedstawia trasę z użyciem KML kontrolowanego w kosmosie i czasie. Elementy związane z trasami znajdują się w przestrzeni nazw rozszerzeń Google.
- Tryby wysokości
- Od momentu wprowadzenia elementów w przestrzeni nazw rozszerzeń Google Earth w wersji 5.0 można przenosić podwodne widzów dzięki nowym trybom wysokości. Ten rozdział dotyczy również tradycyjnych trybów naziemnych.
- Czas i animacja
- Z dowolnymi funkcjami w formacie KML mogą być powiązane dane czasowe. Gdy plik KML zawiera funkcję z elementami TimeSpan lub TimeStamp, Google Earth wyświetla suwak czasu. Za pomocą suwaka i przycisku odtwarzania użytkownik może „odtworzyć” całą sekwencję lub wybrać poszczególne przedziały czasu do wyświetlenia.
- Aparaty fotograficzne
- Miejsce na zdjęcia w Aparacie to dodatkowy sposób określania punktu widzenia obiektu. Aparaty używane są w nakładkach fotograficznych (kolejnych funkcjach dodanych w KML 2.2). <Kamera> zapewnia pełną kontrolę nad 6 stopniami swobody, dzięki czemu możesz umieścić kamerę w kosmosie i obrócić ją wokół osi x, y i z.
- Nakładki fotograficzne
- Element PhotoOverlay umożliwia położenie geograficzne zdjęć oraz określanie położenia i orientacji aparatu, w których wyświetlana jest ta nakładka. Pole Nakładka może być prostym prostokątem 2D, częściowym lub pełnym cylindrem albo kulą sferyczną (w przypadku zdjęć sferycznych). Podrzędny element ImagePyramid w Photo nakładanie umożliwia efektywną obsługę bardzo dużych zdjęć w Google Earth.
- Niebo w pliku KML
- Teraz możesz wyświetlać dane niebieskie w Google Earth. Na tej stronie opisano, jak skonfigurować plik KML do wyświetlania nieba, wraz ze wskazówkami dotyczącymi konwersji standardowych współrzędnych niebieskich na wyświetlanie w Google Earth w trybie Niebo.
- Dodawanie danych niestandardowych
- Dane niestandardowe możesz dodawać do funkcji KML na 3 różne sposoby w zależności od ich rodzaju. Nowy element ExtendedData umożliwia dodawanie do funkcji KML własnych danych, które nie są wpisane, wpisane lub dowolnych plików XML. Google Earth zachowa te informacje wraz z plikiem. Niezredagowane dane i wpisane dane zawierają elementy wyświetlania, których można używać w szablonach stylu i zastępowaniu elementów w dymku.
- Modele
- Obiekty trójwymiarowe mogą być modelowane w naturalny sposób we własnej współrzędnej i eksportowane jako pliki COLLADATM, a następnie importowane do Google Earth i umieszczane na powierzchni Ziemi.
- Regiony
- Regiony zapewniają funkcje usuwania danych i poziomy szczegółowości, które pozwalają dostosować sposób wyświetlania danych w Google Earth. W połączeniu z NetworkLinks regiony umożliwiają strumieniowe przesyłanie bardzo dużych zbiorów danych, korzystając z „inteligentnego” wczytywania danych na różnych poziomach rozdzielczości (zobacz sekcję Supernakładki). Możesz też symulować warstwy Google Earth za pomocą opcji Regiony.
- Aktualizacje
- Dane wczytywane przez NetworkLinks można aktualizować stopniowo – zmieniając, dodając i usuwając dane KML, które zostały wcześniej wczytane do Google Earth.
- Data ważności
- Z tej strony dowiesz się, jak zapobiegać wyświetlaniu nieaktualnych danych KML przy użyciu nagłówków HTTP i okresów ważności KML.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2022-12-20 UTC.
[null,null,["Ostatnia aktualizacja: 2022-12-20 UTC."],[[["\u003cp\u003eThis section provides further detail on key KML elements and their usage.\u003c/p\u003e\n"],["\u003cp\u003eKML files can incorporate touring, altitude modes, time, animation, and camera viewpoints for features.\u003c/p\u003e\n"],["\u003cp\u003eFeatures can include photo overlays, sky data, custom data, 3D models, and regions for enhanced visualization.\u003c/p\u003e\n"],["\u003cp\u003eNetworkLinks support data updates and can leverage regions for efficient streaming and level-of-detail management.\u003c/p\u003e\n"],["\u003cp\u003eKML data freshness can be controlled using HTTP headers and expiration times to prevent staleness.\u003c/p\u003e\n"]]],[],null,["# Developer's Guide\n\nThis section includes pages with additional information on key KML elements and how to use them.\n\n[KMZ Files](/kml/documentation/kmzarchives)^Updated^\n: Learn how to package up (and compress) your KML file and all its related images, overlays, icons, and sound files into one tidy unit that can be posted or emailed as a single entity.\n\n[Touring](/kml/documentation/touring)\n: Google Earth 5.0 introduces touring: KML-controlled movement through space and time. Touring-related elements are contained in the Google extension namespace.\n\n[Altitude Modes](/kml/documentation/altitudemode)\n: With the introduction of elements in the Google extension namespace, Google Earth 5.0 can take viewers underwater with new clampToSeaFloor and relativeToSeaFloor altitude modes. This chapter also discusses the traditional, above-ground modes.\n\n[Time and Animation](/kml/documentation/time)\n: Any Feature in KML can have time data associated with it. When a KML file contains a Feature with TimeSpan or TimeStamp elements, Google Earth displays a time slider. Using the slider and play button, the user can \"play\" the entire sequence or can select individual time periods for display.\n\n[Cameras](/kml/documentation/cameras)\n: The Camera element provides an additional way to specify the viewpoint for a Feature. Cameras are used with PhotoOverlays, another feature added in KML 2.2. \\\u003cCamera\\\u003e provides full six-degrees-of-freedom control over the view, so you can position the Camera in space and then rotate it around the *x* , *y* , and *z* axes.\n\n[PhotoOverlays](/kml/documentation/photos)\n: The PhotoOverlay element allows you to geographically locate a photograph on the Earth and to specify the placement and orientation of the Camera that views this PhotoOverlay. The PhotoOverlay can be a simple 2D rectangle, a partial or full cylinder, or a sphere (for spherical panoramas). The ImagePyramid child element of PhotoOverlay provides for efficient handling of arbitrarily large photographs in Google Earth.\n\n[Sky Data in KML](/kml/documentation/kmlsky)\n: Now you can display celestial data in Google Earth. This page describes how to set up your KML file to view the sky, with tips on converting standard celestial coordinates to display in Google Earth, Sky mode.\n\n[Adding Custom Data](/kml/documentation/extendeddata)\n: You can add custom data to KML Features in three different ways, depending on the kind of custom data. The new ExtendedData element allows you to add your own untyped data, typed data, or arbitrary XML data to a KML Feature. Google Earth preserves this information along with the file. Untyped data and typed data contain display elements that can be used for style templates and entity replacement in the balloon.\n\n[Models](/kml/documentation/models)\n: Three-dimensional objects can be modeled naturally in their own coordinate space and exported as COLLADA™ files, then imported into Google Earth and placed on the Earth's surface.\n\n[Regions](/kml/documentation/regions)\n: Regions provide culling and level-of-detail behavior that allow you to fine-tune how your data is presented in Google Earth. When used with NetworkLinks, Regions enable streaming of very large datasets, with \"smart\" loading of data at multiple levels of resolution (see the section on [Super-Overlays](/kml/documentation/regions#superoverlays)). You can also simulate Google Earth's layers using Regions.\n\n[Updates](/kml/documentation/updates)\n: You can incrementally update data loaded by NetworkLinks---changing, adding, and deleting KML data that was previously loaded into Google Earth.\n\n[Expiration](/kml/documentation/expiration)\n: This page discusses how to prevent KML data from becoming stale, through the use of HTTP headers and KML expiration times."]]