Error: Polygon KML data structure is invalid
I'm getting an error on the KML format for a Map Polygon. I found the county coordinates in Google Fusion Tables. Anyone have experience with this that could help?
I followed the guidelines in https://help.salesforce.com/articleView?id=pfs_import_kml.htm&type=5
Hi, we were able to find the right structure for KML. Here is the one-
FSL__Polygon__c myPolygon = new FSL__Polygon__c(
Name = 'Central SSS1'
,FSL__Color__c = '#5679C0'
,FSL__KML__c = '<?xml version="1.0" encoding="UTF-8"?> '+
'<kml xmlns="http://www.opengis.net/kml/2.2">'+
'<Style id="CentralSSSStyle">'+
'<LineStyle>'+
'<width>1</width>'+
'</LineStyle>'+
'<PolyStyle>'+
'<color>80C07956</color>'+
'</PolyStyle>'+
'</Style>'+
'<Placemark>'+
'<name>CentralSSS</name>'+
'<styleUrl>#CentralSSSStyle</styleUrl>'+
'<Polygon>'+
'<outerBoundaryIs>'+
'<LinearRing>\n'+
'<coordinates>-89.02172505348693,47.81952924639332,0\n'+
'-84.18774067848693,48.01097620848099,0\n'+
'-84.89086567848693,46.22441984873406,0\n'+
'-88.34057270973693,45.91190522847453,0\n'+
'-88.90087544411193,47.53103006689299,0\n'+
'-89.30736958473693,47.77524856801052,0\n'+
'-89.02172505348693,47.81952924639332,0\n'+
'</coordinates>\n'+
'</LinearRing>'+
'</outerBoundaryIs>'+
'</Polygon>'+
'</Placemark>'+
'</kml>'
,FSL__Ma_La__c = 48.01097620848099
,FSL__Ma_Lo__c = -84.18774067848693
,FSL__Mi_La__c = 45.91190522847453
,FSL__Mi_Lo__c = -89.30736958473693
);
insert myPolygon;