Bharani Deepika
Posted Answers
Answer
Tip: To see the KML "code" for a feature in Google Earth, you can simply right-click the feature in the 3D Viewer of Google Earth and select Copy. Then Paste the contents of the clipboard into any text editor. The visual feature displayed in Google Earth is converted into its KML text equivalent. Be sure to experiment with this feature.
All of the examples described here are in the KML Samples file. Begin by downloading that file to view the examples in Google Earth.
The KML 2.2 Reference provides details about the KML file format. If you're familiar with XML, you will also be interested in the KML 2.2 Schema.
For a discussion of how to use some of the key features in KML, see the Developer's Guide.
The simplest kind of KML documents are those that can be authored directly in Google Earth—that is, you don't need to edit or create any KML in a text editor. Placemarks, ground overlays, paths, and polygons can all be authored directly in Google Earth.
A Placemark is one of the most commonly used features in Google Earth. It marks a position on the Earth's surface, using a yellow pushpin as the icon. The simplest Placemark includes only a
Open the KML Samples file in Google Earth and expand the Placemarks subfolder. This folder includes three different types of placemark: simple, floating, and extruded. The KML code for the simple placemark looks like this:
The structure of this file breaks down as follows:
If you were wondering where the Placemark is, it's right over Google's Building 41, where we developed Google Earth!
What users commonly think of as a "placemark" in Google Earth is actually a
The KML Samples file has an example of almost everything you can do with Placemark text. You can add links, font sizes, styles, and colors, and specify text alignment and tables. If you'd like to see the full list, copy and paste the "Descriptive HTML" Placemark example (in the Styles and Markup folder) into a text editor.
Google Earth 4.0 has an auto-markup feature that automatically converts text such as www.google.com into active hyperlinks that the user can click. Text inside the
If you want to write standard HTML inside a
Consider the difference between HTML markup with CDATA tags and without CDATA. First, here's the
And here's the
Ground overlays enable you to "drape" an image onto the Earth's terrain. The
Notice that the file begins with the same two lines as the first example: the XML header and KML namespace declaration.
This example uses a Folder (titled "Ground Overlays") as a mechanism to group and label its contents. Notice how the Folder appears in the Places panel when you load the KML Samples file into Google Earth.
The positioning of a ground overlay is controlled by the
Many different types of paths can be created in Google
Earth, and it is easy to be very creative with your data. In KML, a path is created by a
Notice how it is really just one line drawn at altitude above the
ground. The
You can use Polygons to create simple buildings and other shapes. Check out the Polygons folder in the KML Samples file for examples.
The Pentagon example is generated by drawing simple inner and outer shells and then extruding them down to the ground. Here is the code :
This section describes some of the KML elements that must be authored using a text editor, such as shared styles for geometry, highlighted icons for Placemarks, and screen overlays. Authoring KML "by hand" is a bit more advanced than using the Google Earth interface to create and modify features, but with a small amount of practice, most users are comfortable editing KML files to add these effects.
Once you've created features within Google Earth and examined the KML code Google Earth generates, you'll notice how styles are an important part of how your data is displayed. Power users will want to learn how to define their own styles.
If you define a Style at the beginning of a KML Document and also define an ID for it, you can use this style in Geometry, Placemarks, and Overlays that are defined elsewhere in the Document. Because more than one element can use the same Style, styles defined and used in this way are referred to as shared styles. You define a given Style once, and then you can reference it multiple times, using the
The KML Samples file contains a number of shared styles, each defined with an ID at the beginning of the file. Note that it's easiest if your IDs are descriptive strings so that you can easily tell what their effect is. Here's an example of a style ("transBluePoly") that defines a transparent blue color for the polygon faces and a line width of 1.5 (and default color of white) for the edges of the polygon. This style is used by Building 41 in the Google Campus example (in the Polygons folder):
Note that the
The "Highlighted Icon " in the Styles and Markup folder shows you how to create a roll-over effect with KML. The Document defines two styles, one for the "normalPlacemark" and one for the "highlightPlacemark" (shown when the cursor rolls over the Icon). The
The basic steps shown here are as follows:
Screen overlays cannot be authored directly within Google Earth and are thus more difficult to create than ground overlays. A comprehensive collection of samples is included in the Screen Overlays folder in the KML Samples file.
As an example, enable the "Absolute Positioning: Top left" folder in the KML Samples file and you will see a screen overlay at the top left of the view window. This was created with the following KML code:
Positioning is controlled by mapping a point in the image specified
by
Check the other examples in the folder to see how it is possible to obtain other fixed positions, and to create images that size dynamically with screen size. (Note that xunits and yunits can also be specified as "pixels" for precision control.) For further detail, see the KML 2.2 Reference.
A network link contains a element with an
The
The specified file can be either a local file or a file on a remote server. In their simplest form, network links are a useful way to split one large KML file into smaller, more manageable files on the same computer.
So far, all of our examples have required that the KML code be delivered to Google Earth from the local machine. Network links give you the power to serve content from a remote location and are commonly used to distribute data to large numbers of users. In this way, if the data needs to be amended, it has to be changed only at the source location, and all users receive the updated data automatically.
In addition to pointing to files containing static data, a network link's
Two things are necessary for delivering KML through a network CGI:
When a call is made from the client (Google Earth) to the server, the server must (1) return a response code of HTTP 200 and (2) set the response's content type to text/plain or application/vnd.google-earth.kml+xml.
The response must be valid KML. For complex applications, proper error handling is very important.
Tip: A simple way to handle errors is to parse the
server's error as the text for a folder name. For example, you could
have the server return
The following examples use Python, but they are equally valid in any other scripting language.
The following Python script generates random integer values for latitude and longitude and then inserts those values into the
Here is an example of a KML file containing a Network Link that loads this Python script:
A standard network link is a uni-directional link: data flows only
from the server to Google Earth. The view-based refresh enables
bi-directional communication. When the view-based refresh is active,
Google Earth returns the view coordinates to the server at a specified
time. This may be every n seconds, minutes, or hours, or once a certain
amount of time has elapsed since the view stopped moving. See
The coordinates are returned to the server by means of an HTTP GET that appends the coordinates as follows (this is the default bounding box information):
If the request were made while the user was looking down on San Francisco, the coordinates might look as follows:
This feature can be used for some very creative applications, but to get you started, a simple example is presented below.
The following server-side Python script parses the return message sent by Google Earth and responds with a Placemark at the center of the screen. Each time the Network Link is refreshed, a new Placemark is generated.
And here is the KML for the Network Link that loads the Python script:
The principle illustrated in this example can be used for some very complex applications. For example, if you have a database of geographic information, you can extract the coordinates of the viewer, make a call to the database for the data specific to the view, and return it to Google Earth as KML.
When responding to a request from Google Earth (or any Earth browser), a KML server must follow a certain set of rules so that Google Earth can correctly interpret its responses.
Upon success, the server must return a response code of HTTP 200 and set the response's content-type to a suitable MIME type, as described here.
Google Earth reads KML and KMZ files. The MIME type for KML files is
The MIME type for KMZ files is
For Apache, add these lines to the httpd.conf file:
See the Microsoft documentation for details on setting up MIME types on Microsoft's IIS.
Answer is posted for the following question.
Answer
One of the most stunning walks in Scotland, period (Walkhighlands) Just visiting this walk is reason enough to come to Dunoon It is a surreal
Answer is posted for the following question.
What is dunoon famous for?
Answer
Learn how to pronounce Fjelsted Fjelsted Listen Fjelsted pronunciation X Rate the pronunciation difficulty of Fjelsted 1 /5 (1 Vote) Very easy Easy
Answer is posted for the following question.
How to pronounce fjeldsted?
Answer
{ presets: [ @babel/preset-env, @babel/preset-react ]}
Source: StackOverFlow
Answer is posted for the following question.
How to add webpack to react project (Javascript Scripting Language)