kml

How to delete programatically KML nodes from Google Earth?

I build a winforms app in C# which embeds Google Earth as a viewer. Like this. My app receives data regularly, transforms that to KML, and displays the result in Google Earth. Whenever I receive the new update, I want to delete the old KML, but I could not find how in GE API. All I found is making the old stuff invisible: this.g...

DDMS won't load (or doesn't parse?) KML file

I can't get DDMS to load any KML files. I have a KML file for example with the following in it: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"&gt; <Placemark> <name>Simple placemark</name> <description>Attached to the ground. Intelligently places itself at the height of the underlying te...

Looking at location with Google Earth API

I am trying to use the Google Earth API to create a simple view of the globe with a search field in which the user can type a location. When they hit go, the globe will zoom in on the location they typed in. I would like the view to be looking straight down on the location they specified. I have tried the following code: var lookAt = g...

custom kml icons

Hi, I'm trying to create a custom icon to display on google earth. It resides on my local filesystem, and I'm trying to reference it as "file:/C:/myfile.png" but it does not display. Is this possible to do? thanks, Jeff ...

Is it possible in Google Earth to embed HTTP text/HTML output into a Placemark's balloon description area?

I'm displaying KML placemark data in Google Earth via a NetworkLink, and would like to keep the size of the KML down by not including the description text in the Placemarks' KML definitions. Instead, I would like to retrieve and embed remote HTML text (via an HTTP request) only when the balloon window is activated. Is this possible? I k...

Zoom levels in kml files on google maps

When I add GMarkers to a google map I can specifiy the min and max zoom levels at which the marker should be displayed using MarkerManager. Is there a way to specifiy this for Placemarks in kml files when they're displayed in Google Maps? It looks like the region tag in kml does this, but only in Google Earth, not in Google Maps. ...

Dynamic kml file genarated does not get overlayed in my map while using openlayers with javascript.

I am using openlayers function to display kml output over my map. I am generating a kml file when user give a search for any location. So the kml file keeps changing for each search (Since my result keeps changing). I am using : kmlLayer = new OpenLayers.Layer.GML("KML","../kml/searchResult.kml", { p...

Read and parse KML in java

Hi Is there any library available to parse KML ? ...

KML and delete old KMLs files

Exists a way for i can delete the temporary places in google earth before add new placemarks using a kml file? ...

Programmatically creating vector arrows in KML

Does anyone have any practical examples of programmatically drawing icons as vectors in KML? Specifically, I have data with a magnitude and an azimuth at given coordinates, and I would like to have icons (or another graphical element) generated based on these values. Some thoughts on how I might approach it: Image directory (a brute f...

How to override target=_blank in KML popups in embedded Google map?

I'm using KML to overlay shapes on a Google map. Information corresponding to each shape is included in the <description> element, along with a link to a detail page corresponding to that shape. So for example, my KML includes this: <description> <![CDATA[ <div> ... <p> <a href="Concession.20.aspx">Vi...

css in Google Earth plugin

Hello just wondering if it is possible to style a pop-up balloon via an external/linked .css file, rather than inline styles ? thanks in advance ! .k ...

finding shortest paths using google maps for a large number of nodes

I'm trying to do some network analysis for a client. The provided road-network GIS layer is of bad quality; therefore, I have to resort to Google maps to provide me shortest path between 200 points, to produce time and distance matrices between each point. is there a way i can input the layer as a set of KML points to obtain outputs of ...

kmz compression for google earth images with java

Does anyone know what compression to use in Java for creating KMZ files that have images stored within them? I tried using standard Java compression (and various modes, BEST_COMPRESSION, DEFAULT_COMPRESSION, etc), but my compressed file and the kmz file always come out slightly different don't load in google earth. It seems like my png i...

Asp.net VB KML generation script error

I have to create a .kml file from the SQL 2005 database which contains data about real estate properties. The file name is genKML.aspx Imports System Imports System.IO Imports System.Data Imports System.Data.SqlClient Imports System.Text.StringBuilder Imports System.Xml Imports System.Net Partial Class myCDN_genKML Inherits System.Web...

XPath strangeness

I'm writing a script which reads and manipulates a KML (xml) document. Below is a snippet of the document I'm reading: <?xml version="1.0" encoding="UTF-8"?> <!-- Generated by Feature Manipulation Engine 2009 (Build 5658) --> <kml xmlns="http://earth.google.com/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom"&gt; <Document> ...

Why is CakePHP inserting a space before my xml layout?

I am having a really frustrating problem in CakePHP where a space keeps coming up at the beginning of my KML file layout which causes Google Earth to reject the KML file! <?php header("Content-disposition: attachment; filename=area.kml"); header("Content-Type: application/vnd.google-earth.kml+xml kml; charset=utf8"); header("Content-Tra...

Sanitizing KML Stream to change xml namespace

There is some strange behaviour in parsing KML produced by Google Earth using a compliant parser, JAK. The expected namespace by the parser is not written as the correct one by the GE Kml production system and when reading this KML back into another Java application validation fails. We are fiddling the stream as it is read and replacin...

Combine KML Polygons in PHP

I have a problem with the Google Maps API only allowing 1000 features per map. In a database, I keep records of areas. Each area has associated with it a heap of KML polygon information, stored as an XML string. Each area is made up of one or more polygons. Given some user input, a handful of these areas are combined into one <Placemar...

In KML What Makes a Line String Have Multiple Geometries?

I know this is a total newbie question, but I happen to be a total newbie when it comes to KML. I am working on a GIS project using KML and I keep running into this multiple geometry issue. I want to programmatically determine when I need to encapsulate my <LineString /> points in a <MultiGeometry /> tag and when I don't. Is it when a...