KmlLayerSourceProvider is a class used to build KmlDynamicLayerSource.
var layerSourceProvider = new KmlLayerSourceProvider(); var kmlLayerSourceCreateOptions = { name: 'kmlfilename', data: null }; var mapServiceDetailsPromise = Q($.ajax({ url: urlToMapDetails, type: "GET"})); Q(mapServiceDetailsPromise).then((data: any[]) => { kmlLayerSourceCreateOptions.data = new DOMParser().parseFromString(data[0], "text/xml"); layerSourceProvider.create(this.fileSource, kmlLayerSourceCreateOptions); });
KmlLayerSourceProvider is a class used to build KmlDynamicLayerSource.
var layerSourceProvider = new KmlLayerSourceProvider();
var kmlLayerSourceCreateOptions = { name: 'kmlfilename', data: null };
var mapServiceDetailsPromise = Q($.ajax({ url: urlToMapDetails, type: "GET"}));
Q(mapServiceDetailsPromise).then((data: any[]) => {
kmlLayerSourceCreateOptions.data = new DOMParser().parseFromString(data[0], "text/xml");
layerSourceProvider.create(this.fileSource, kmlLayerSourceCreateOptions);
});