Last updated

API / geotoolkit / map / util / KML / KML

Class: KML

util.KML.KML

KML (Keyhole Markup Language) parser

Table of contents

Constructors
Methods

Contents

Constructors

new KML()

new KML()

Methods

getClassName

getClassName(): string

Returns

string


getClassName

Static getClassName(): string

Returns

string


parse

Static parse(xmlElement, iGetFeatureId?, crsConversion?, invalidateHandler?, styles?, features?): AbstractFeature[]

Creates GeoToolkit Shape-based AbstractFeature objects based on KML features

Parameters

Name Type Description
xmlElementElement | XMLDocumentDOMElement object that contains all the features data in KML format
Optional iGetFeatureIdIGetIdhow to retrieve feature id from geoJson feature's properties
Optional crsConversionCrsConversionfunction for converting points into the map coordinate system
Optional invalidateHandler() => voidfunction to be called when async templates are ready to be drawn
Optional stylesRecord<string, Record<string, BaseTemplate>>styles map that contains connection between style ids and feature templates
Optional featuresAbstractFeature[]features array to store parsed features (new array created if not provided)

Returns

AbstractFeature[]

features