Hi,
I was using one of the older WGS84 basemap services - ESRI_Imagery_World_2D (MapServer). Note that: "This map is in Extended Support and is no longer updated. Esri recommends that you use World_Imagery instead"
If you would like to use a WGS84 basemap in an offline app then you can either create a basemap tile package directly from your map (How to create a tile package—Help | ArcGIS for Desktop) or alternatively publish a service and extract a cache from the service, which is good if you have multiple users who need to generate different areas/scales of cache on-demand (ArcGIS REST API).
Actually, I too was doing this in C# outside of the KMLLayer for testing purposes:
string coords = "171.35,80.83;98.93,85.17;98.63,85.02;43.08,79.07;26.97,70.88;18.8,62.3;13.47,53.5;8.57,44.8;3.58,36.35;-1.63,28.2;-6.93,20.33;-12.12,12.63;-17.17,5.02;-22.63,-2.25;-28.22,-9.43;-34.98,-15.7;-42.67,-21.08;-51.18,-25.62;-60.55,-29.12;-70.7,-31.12;-81.2,-31.18;-91.42,-29.72;-101.02,-26.97;-109.62,-22.85;-117.3,-17.83;-123.9,-11.9;-129.32,-5.05;-133.55,2.47;-136.9,10.3;-140.45,17.78;-144.75,24.98;-148.6,32.53;-152.02,40.37;-155.85,48.28;-160.8,56.27;-165.75,64.48;-172.62,72.78";
GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
graphicsOverlay.Renderer = new SimpleRenderer()
{
Symbol = new SimpleLineSymbol()
{
Color = Colors.Red,
Style = SimpleLineStyle.Solid,
Width = 2,
}
};
List<MapPoint> mapPoints = new List<MapPoint>();
string[] coordPairs = coords.Split(';');
int counter = 0;
foreach (var coordPair in coordPairs)
{
string[] coord = coordPair.Split(',');
MapPoint mapPoint = new MapPoint(Convert.ToDouble(coord[0]), Convert.ToDouble(coord[1]), SpatialReferences.Wgs84);
mapPoints.Add(mapPoint);
Graphic graphic = new Graphic(mapPoint, new TextSymbol()
{
Text = counter.ToString()
});
graphicsOverlay.Graphics.Add(graphic);
counter++;
}
Polyline polyLine = new Polyline(mapPoints,SpatialReferences.Wgs84);
graphicsOverlay.Graphics.Add(new Graphic(polyLine));
MyMapView.GraphicsOverlays.Add(graphicsOverlay);
Cheers
Mike