jak

KML marshal produces zero-length files

烂漫一生 提交于 2019-12-23 02:56:16
问题 In Java code, I spawn a Thread which every second gathers DIS packets from a simulator, and tries to format KML output. In my Java code I am creating a Document, with Styles and Placemarks and Polygons. Once every second I can see that the "marshal" API routine does indeed create a KML file with my data. However, randomly sometimes it creates a complete file, and sometimes it creates a zero-length file. Even when I turn my DIS packet generator off, and leave my Java code still running, it

KML marshal produces zero-length files

你离开我真会死。 提交于 2019-12-06 15:38:04
In Java code, I spawn a Thread which every second gathers DIS packets from a simulator, and tries to format KML output. In my Java code I am creating a Document, with Styles and Placemarks and Polygons. Once every second I can see that the "marshal" API routine does indeed create a KML file with my data. However, randomly sometimes it creates a complete file, and sometimes it creates a zero-length file. Even when I turn my DIS packet generator off, and leave my Java code still running, it continues to randomly create a complete file, and sometimes create a zero-length file. When I change my

Extract coordinates from KML file in Java

Deadly 提交于 2019-12-05 01:29:45
问题 I'm trying to parse a Kml file in Java. Cause I need to take the coordinates of a Placemark, to generate a poligon in java, and use it. But my problem , is that i'm using JAK this library to parse it, and i'm not able to extract the information that i want.(I read the "help" in the official page, but I didn't found any help abut my problem) I'm trying to do something like that: final Kml kml = Kml.unmarshal(new File("C:/Users/A556520/Documents/Proyectos/GeoFencing/res/labasa.kml")); final

KML Layers rendering order google maps

拜拜、爱过 提交于 2019-12-02 16:23:27
问题 I have noticed some different behavior with the following APIS <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> http://jsfiddle.net/x8dSP/2062/ Sometimes the polygon layer renders ontop of the balloon layer, and sometimes the opposite. It seems like after the map is "cached?" in the browser it will render with the polygon layer ontop. Is there anyway to prevent this? Or to have one layer always be in the background? Unfortunately I cannot map these layers

Java API for KML (JAK) embedding images in kmz files

三世轮回 提交于 2019-11-29 07:56:29
Is there a way to just add an image file into a kmz file using Java API for KML (JAK)? I can create a kml file with no problem, but I'm trying to just embed a resources (such as an images folder with some image files), but the marshalAsKmz method takes only Kml objects as additional files, so I can't figure out how to just include extra images. I've been using JAK for over a year on a project. I use it to create the KML, then I marshal it as just plain KML (not KMZ). I created a separate utility class that uses the Java SE 'Zip' classes to manually create the KMZ. It works just fine. A KMZ is

Java API for KML (JAK) embedding images in kmz files

十年热恋 提交于 2019-11-28 01:25:56
问题 Is there a way to just add an image file into a kmz file using Java API for KML (JAK)? I can create a kml file with no problem, but I'm trying to just embed a resources (such as an images folder with some image files), but the marshalAsKmz method takes only Kml objects as additional files, so I can't figure out how to just include extra images. 回答1: I've been using JAK for over a year on a project. I use it to create the KML, then I marshal it as just plain KML (not KMZ). I created a separate