de.micromata.opengis.kml.v_2_2_0.Kml.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中de.micromata.opengis.kml.v_2_2_0.Kml.<init>()方法的一些代码示例,展示了Kml.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Kml.<init>()方法的具体详情如下:
包路径:de.micromata.opengis.kml.v_2_2_0.Kml
类名称:Kml
方法名:<init>

Kml.<init>介绍

暂无

代码示例

代码示例来源:origin: de.micromata.jak/JavaAPIforKml

/**
 * Create an instance of {@link Kml}
 * 
 */
public static Kml createKml() {
  return new Kml();
}

代码示例来源:origin: micromata/javaapiforkml

/**
 * Create an instance of {@link Kml}
 * 
 */
public static Kml createKml() {
  return new Kml();
}

代码示例来源:origin: stackoverflow.com

Marshaller m =  JAXBContext.newInstance(new Class[] { Kml.class }).createMarshaller();
m.setProperty( Marshaller.JAXB_FORMATTED_OUTPUT, true );
m.setProperty( Marshaller.JAXB_FRAGMENT, false );
m.setProperty(javax.xml.bind.Marshaller.JAXB_ENCODING, "UTF-8");
final Kml kml = new Kml();    
kml.createAndSetPlacemark()
.withName("London, UK").withOpen(Boolean.TRUE)
.createAndSetPoint().addToCoordinates(-0.126236, 51.500152);
StringWriter sw = new StringWriter();
m.marshal(kml,sw);
String s1 = sw.toString();
System.out.println(s1);

代码示例来源:origin: stackoverflow.com

final Kml kml = new Kml();
   Document document = kml.createAndSetDocument();
   listForms = formDAO.getAll();
   for (Form list : listForms){
     document.createAndAddPlacemark()
     .withName(String.valueOf(list.getId()))
     .withDescription(list.toStringKML())
     .createAndSetPoint().addToCoordinates(-20.3978398, -43.5146653);
   }
   kml.setFeature(document);
   kml.marshal(new File("test.kml"));

代码示例来源:origin: stackoverflow.com

final Kml __balloonKML = new Kml();

代码示例来源:origin: stackoverflow.com

final Kml kml = new Kml();
 final Folder folder = new Folder();
 kml.setFeature(folder);
 folder.setName("Folder.kml");
 folder.setOpen(true);
 final Placemark placemark1 = new Placemark().withId("1")
   .withName("Folder object 1 (Placemark)");
 folder.getFeature().add(placemark1);
 final Placemark placemark2 = new Placemark().withId("2")
   .withName("Folder object 2 (Placemark)");
 folder.getFeature().add(placemark2);
 List<Feature> features = folder.getFeature();
 System.out.println(features); // dumps two features     
 for(int i=features.size()-1; i >= 0; i--)
 {
   Feature f = features.get(i);
   if("1".equals(f.getId()))
   {
     // this removes feature with id = "1"
     features.remove(i);
     break;
   }
 }
 System.out.println(features); // folder now only has one item

代码示例来源:origin: org.geoserver.community/gs-wps-download

throws IOException {
Kml kml = new Kml();
Document document = kml.createAndSetDocument();
Folder folder = document.createAndAddFolder();

代码示例来源:origin: org.geoserver/kml

public Kml buildKMLDocument() {
  // prepare kml, document and folder
  Kml kml = new Kml();
  Document document = kml.createAndSetDocument();
  Map formatOptions = context.getRequest().getFormatOptions();
  String kmltitle = (String) formatOptions.get("kmltitle");
  if(kmltitle == null) {
    kmltitle = context.getMapContent().getTitle();
  }
  document.setName(kmltitle);
  
  // get the callbacks for the document and let them loose
  List<KmlDecorator> decorators = context.getDecoratorsForClass(Document.class);
  for (KmlDecorator decorator : decorators) {
    document = (Document) decorator.decorate(document, context);
    if (document == null) {
      throw new ServiceException("Coding error in decorator " + decorator
          + ", document objects cannot be set to null");
    }
  }
  encodeDocumentContents(document);
  return kml;
}

代码示例来源:origin: org.geoserver.community/gs-kmlppio

Kml kml = new Kml();
Document document = kml.createAndSetDocument();

代码示例来源:origin: org.geoserver/kml

/**
 * Builds a lazily evaluated KML document given a encoding context
 * 
 * @param context
 * @return
 */
public Kml buildKMLDocument(KmlEncodingContext context) {
  // prepare kml, document and folder
  Kml kml = new Kml();
  Document document = kml.createAndSetDocument();
  String kmltitle = (String) context.getRequest().getFormatOptions().get("kmltitle");
  document.setName(kmltitle);
  // get the callbacks for the document and let them loose
  List<KmlDecorator> decorators = context.getDecoratorsForClass(Document.class);
  for (KmlDecorator decorator : decorators) {
    document = (Document) decorator.decorate(document, context);
    if (document == null) {
      throw new ServiceException("Coding error in decorator " + decorator
          + ", document objects cannot be set to null");
    }
  }
  // create a generator that will generate a folder and feature dumps/ground overlays for each
  // layer
  SequenceFactory<Feature> generatorFactory = new PlainFolderSequenceFactory(context);
  SequenceList<Feature> folders = new SequenceList<Feature>(generatorFactory);
  context.addFeatures(document, folders);
  return kml;
}

代码示例来源:origin: org.geoserver/kml

Kml kml = new Kml();
Document document = kml.createAndSetDocument();

相关文章