Questions tagged [sharpkml]

SharpKML is an implementation of the Open Geospatial Consortium (OGC) KML 2.2 standard developed in C#, able to read/write both KML files and KMZ files.

SharpKML is an implementation of the Open Geospatial Consortium (OGC) KML 2.2 standard developed in C#, able to read/write both KML files and KMZ files.

The library has been based on Google's C++ implementation of the standard (libkml), however, instead of using the SWIG bindings the code has been written from scratch to give a more C# feel, by using properties, extension methods and the built in Xml handling of the .NET framework.

25 questions
7
votes
4 answers

styling KML files in c#

I have written webapp in asp.net(C#) which takes coordinates from database and create .KML for which I then put into Google maps and works fine i.e drawing line string but I want to put styles into it i.e. changing place mark styles, colors, size…
user3518032
  • 423
  • 8
  • 25
6
votes
2 answers

How to create a StyleMap tag with SharpKml?

I'd like to know how to create the following XML using SharpKml: normal #sn_placemark_circle highlight
Martijn
  • 24,441
  • 60
  • 174
  • 261
4
votes
1 answer

How to create child folders or documents with sharpkml

Does anyone know how to create child folders or documents with sharpkml? I have currently one folder which has a few documents in it but I can't add folder. It would be nice if somebody would have an idea.
Karsten P
  • 41
  • 2
3
votes
4 answers

C# Generic List foreach OutofMemoryException

I have a program that reads approximately 2million rows from a database into a List. Each row is a location that contains information such as geographic co-ordinates. Once data is added to the List I use a foreach loop and grab the co-ordinates to…
Richard Todd
  • 2,406
  • 5
  • 32
  • 40
2
votes
0 answers

How do you insert a new placemark in a kml with SharpKML

I am having a problem with KMLSharp. I want to add a new placemark to my kml file using SharpKML. This is the code I am using. // Create our Kml TextReader reader = File.OpenText(Server.MapPath(@"~\kml\fountains\test1.kml")); KmlFile…
user3410255
  • 21
  • 1
  • 3
2
votes
3 answers

Set Initial View When Opening KMZ in GE

I am creating a KMZ file as output from my program (using SharpKML). How can I set the initial view so that when this file is opened in Google Earth it centres and zooms around my data? When I open a KML file in GE this behaviour is by default, but…
Guy
  • 413
  • 6
  • 20
2
votes
1 answer

Cannot set individual icon heading using SharpKML

Using SharpKML library from VB (VS2010), I can create kml files with a custom icon for each placemark. The placemarks are created in a loop and I want to set the icon's heading property for each placemark. 'Define the style for the icon Dim…
Guy
  • 413
  • 6
  • 20
1
vote
1 answer

Sharpkml insert Icon in Folder

I want insert Icon in Folder using Sharpkml and get result klm like this:
Sergey
  • 21
  • 2
1
vote
1 answer

Export Datatable to KML file

i Guys, I have a problem when i export a datable of 1000 records to a KML file with c#, When i export it only the last placemark is write in to the kml file, but i dont know why... This is my code public static void generar_kml(DataTable…
ALEX CISCO
  • 11
  • 2
1
vote
1 answer

Create a track in Google Earth using sharpKML

I am trying to create a track in Google Earth (Using a KML) I am using sharpKML for C# I can successfully create a path. How do I create a track? I understand that I need to add a "point" and a "when" and I do so by doing the following - …
OneGuyInDc
  • 1,557
  • 2
  • 19
  • 50
1
vote
0 answers

Show "all possible" extended data fields in balloon

Background: Alright so I am working on an application that uses SharpKML to produce a number of Placemarks that each have properties associated with it. I want to show these properties as custom data elements within the popup balloon. Problem: I…
Adrian773
  • 473
  • 11
  • 22
1
vote
2 answers

How to return a KML content

I'm trying to cook a web api that connects to my DB, fetch some geographical data, then returns a KML content that will be consumed by a webpage (displaying the info on a google maps iframe/div). I'm using sharpKML (and I don't know if it's the…
silentman.it
  • 361
  • 5
  • 18
1
vote
1 answer

Split a line into multiple equal parts

I need to split a line into multiple equal parts (so each part can be individually colour coded). I have a couple of questions : 1) Has anyone come across c# code to do this already? 2) Am I right in assuming that I can use normal 'flat'…
Andrew Jones
  • 285
  • 3
  • 11
0
votes
1 answer

Delete a Placemark and save the whole kml minus the placemark into a new file

My goal is to remove placemarks in a kml file read with sharpkml and save the xml as new kml. What I tried RemoveChildren -> Not found AddUpdate with DeleteCollection -> Not working And using SharpKml.Base; using SharpKml.Dom; using…
Aurelius Schnitzler
  • 511
  • 2
  • 8
  • 18
0
votes
0 answers

Creating a custom KML file to load approach path data that is present in a json file

I am working on kml file integration on cesium maps. I already have a json file with approach_path data for airplanes. I want to convert this file into a kml file so that I can load the corresponding data onto the cesium map showing the approach…
Sushant Bassi
  • 364
  • 3
  • 16
1
2